2.docker.md 1.02 KB
Newer Older
1 2 3 4 5 6 7
Testing Flatisfy using Docker
=============================

A basic `Dockerfile` is available for rapid testing. It is still really hacky
and should not be used in production.


8
1\. First, build the docker image:
9 10 11

```
cd docker
12
docker build -t phyks/flatisfy .
13 14
```

15
2\. Then, create some folder to store your Flatisfy data in a permanent way (it
16 17 18 19 20 21 22
   will be mount as a Docker volume in next steps), and initialize an empty
   config:

```
mkdir flatisfy
cd flatisfy
FLATISFY_VOLUME=$(pwd)
23
docker run -P -v $FLATISFY_VOLUME:/flatisfy -p 8080:8080 phyks/flatisfy sh -c "cd /home/user/app && python -m flatisfy init-config > /flatisfy/config.json"
24 25 26
```


27
3\. Then, edit the generated `config.json` file according to your needs. See
28 29 30 31
   [0.getting_started.md](0.getting_started.md) for more infos on the
   configuration file format.


32
4\. Finally, run the docker image to fetch flats and serve the web UI:
33 34

```
35
docker run -P -v $FLATISFY_VOLUME:/flatisfy -p 8080:8080 phyks/flatisfy
36 37 38
```

Your Flatisfy instance is now available at `localhost:8080`!