Closed rexim closed 7 years ago
Just keep it in the container. Create container like so:
$ docker build -t tsoder .
$ docker run -e ACCESS_TOKEN="<access-token>" --name morning_tsoding tsoder
To start the container:
$ docker start morning_tsoding
To stop the container:
$ docker stop morning_tsoding
The state is always in the container.
@rexim document this approach in the README
Another question is how to properly backup such container?
Right now it is recommended to start the docker image with
--rm
https://github.com/tsoding/tsoder/blob/80200fed590230982321e8c8a0d209f540bf63fa/README.md#docker which removes the container after application shutted down. But the state is persisted on the file system, and removing container removes the state as well.We need to come up with a better approach.