Skip to content

Commit

Permalink
Fix creation of Docker image, extend documentation accordingly
Browse files Browse the repository at this point in the history
  • Loading branch information
ad-si committed Jul 14, 2019
1 parent 08c0d6f commit fa4cad3
Show file tree
Hide file tree
Showing 15 changed files with 334 additions and 168 deletions.
5 changes: 2 additions & 3 deletions .dockerignore
@@ -1,9 +1,8 @@
*

!/docker-stack.yaml

!/tasklite-core
/tasklite-core/.stack-work

!/tasklite-app
/tasklite-app/.stack-work

!/stack.yaml
19 changes: 13 additions & 6 deletions Dockerfile
@@ -1,10 +1,17 @@
from haskell:8.6.5 as builder

add tasklite-core tasklite-core
add tasklite-app tasklite-app
copy docker-stack.yaml stack.yaml

add stack.yaml stack.yaml
run stack install tasklite-core
copy tasklite-core/package.yaml tasklite-core/package.yaml
run stack install --only-dependencies tasklite-core

# from alpine:3.9.4
# copy --from=builder /usr/root/.local/bin/tasklite .
copy tasklite-core tasklite-core
run stack install


from debian:9.9
run apt-get update && \
apt-get install -y libgmp10
copy --from=builder /tasklite-core/example-config.yaml /root/.config/tasklite/config.yaml
copy --from=builder /root/.local/bin/tasklite /usr/local/bin/tasklite
cmd ["tasklite"]
13 changes: 13 additions & 0 deletions docker-stack.yaml
@@ -0,0 +1,13 @@
resolver: lts-13.27
packages:
- tasklite-core

extra-deps:
- beam-sqlite-0.4.0.0
- beam-core-0.8.0.0
- beam-migrate-0.4.0.1
- crockford-0.2
- fuzzy-0.1.0.0
- ulid-0.2.0.0
- github: JakeWheat/simple-sql-parser
commit: 00433a26e8303c9e61359f406da5a2dbf1293fc8
11 changes: 10 additions & 1 deletion docs-source/SUMMARY.md
@@ -1,14 +1,23 @@
# Summary

- [Introduction](./introduction.md)
- [Installation](./installation.md)

- [Installation](./installation/readme.md)
- [CLI](./installation/cli.md)
- [Desktop App](./installation/desktop_app.md)
- [Web App](./installation/web_app.md)

- [Usage](./usage/readme.md)
- [CLI](./usage/cli.md)
- [Desktop App](./usage/desktop_app.md)
- [Web App](./usage/web_app.md)
- [REST API](./usage/rest_api.md)
- [Haskell API](./usage/haskell_api.md)

- [Differences to Taskwarrior](./differences_taskwarrior.md)

- [Performance](./performance.md)

- [Development](./development.md)

- [Related](./related.md)
24 changes: 8 additions & 16 deletions docs-source/development.md
Expand Up @@ -23,7 +23,12 @@ Main technologies:
[ULID]: https://github.com/ulid/spec


### Generate Screenshot
**Check out the [makefile] for all development tasks**

[makefile]: https://github.com/ad-si/TaskLite/blob/master/makefile


## Generate Screenshots

Use asciinema to generate the terminal recording:

Expand Down Expand Up @@ -66,20 +71,7 @@ svg-term \
[svg-term]: https://github.com/marionebl/svg-term-cli


## Documentation

Build the documentation with following command:

```sh
docker run \
--rm \
--volume "$PWD":/data \
hrektts/mdbook \
mdbook build
```


### Ghcid
## Ghcid

Ghcid with color output for GHC 8.4 (probably obsolete in 8.6):

Expand All @@ -89,7 +81,7 @@ ghcid \
```


### Hlint
## Hlint

```sh
hlint \
Expand Down
135 changes: 0 additions & 135 deletions docs-source/installation.md

This file was deleted.

66 changes: 66 additions & 0 deletions docs-source/installation/cli.md
@@ -0,0 +1,66 @@
# CLI Tool

## Configuration

It's a good idea to create a config file
at `~/.config/tasklite/config.yaml` first.

Check out the [example config file] for infos about available settings.

[example config file]:
https://github.com/ad-si/TaskLite/blob/master/tasklite-core/example-config.yaml


## From Source

To build TaskLite from source, you need [Stack].

[Stack]: https://docs.haskellstack.org/en/stable/install_and_upgrade/

```shell
git clone https://github.com/ad-si/TaskLite
cd TaskLite
stack install tasklite-core
```

To test the installation run:

```shell
tasklite version
```


## With Docker

If you just want to try it out run:

```sh
docker run --rm adius/tasklite sh
tasklite help
```

When exiting the container all data will be discarded.

For repeated local usage run following command,
but make sure to replace `$TASKLITE_PATH` with the path to your
TaskLite installation as defined in your `config.yaml` file.
Per default it's created in the [XDG base directory]:
`$HOME/.local/share/tasklite`.

[XDG base directory]: https://standards.freedesktop.org/basedir-spec/latest/

```sh
docker run \
--rm \
--volume "$TASKLITE_PATH":/root/.local/share/tasklite \
adius/tasklite
```

To make it easier to use, create an alias like:

```sh
alias tl="docker run …"
```

Providing your own `config.yaml` file to the docker container
is not yet supported.
44 changes: 44 additions & 0 deletions docs-source/installation/desktop_app.md
@@ -0,0 +1,44 @@
# Desktop App

## Native GTK App

**Attention: This is still early alpha**

A few dependencies must be availabe to build the app.
To install them on macOS run:

```shell
brew install \
gtk+3 \
libffi \
gobject-introspection \
gdk-pixbuf
```

```shell
git clone https://github.com/ad-si/TaskLite
cd TaskLite
stack install tasklite-app
```

It might be necessary to add the package "libffi" to the pkg-config search path
before installation.
For example with [fish]:
```fish
set -x PKG_CONFIG_PATH /usr/local/opt/libffi/lib/pkgconfig
```

Start it with:
```sh
tasklite-app
```

[fish]: https://fishshell.com/


## DB Browser for SQLite

Alternatively you can use the [DB Browser for SQLite]
to view and modify your tasks directly in the SQLite database.

[DB Browser for SQLite]: https://sqlitebrowser.org/
4 changes: 4 additions & 0 deletions docs-source/installation/readme.md
@@ -0,0 +1,4 @@
# Installation

Check out the following pages for instructions
on how to install the different versions of TaskLite.

0 comments on commit fa4cad3

Please sign in to comment.