Docker
Contents
Docker#
The docker produces by the Dockerfile
file is meant to be used in production.
It uses waitress to serve requests.
Note
A DB update is automatically done before docker start, by the entrypoint.sh
script.
DockerHub#
Offical docker of collectives are distributed on DockerHub cafannecy repository .
Versions are linked to those on github.
Upload are done by Github during release creation by the Github Action Publish Docker image
.
Use cafannecy/collectives docker#
Mounts#
Those mounts are recommended since they contains app generated data that should be kept.
/app/collectives/static/uploads
contains user uploads/app/collectives/private_assets
contains data that should not be exposed bystatic
blueprint.
Application configuration#
Cold Configuration is to be done through environment variables. Look for configuration that can be set by environment variables in Application configuration .
Warning
For security reasons, these configurations should be configured:
config.SECRET_KEY
: Default key is public and should not be trusted in the wild.config.ADMINPWD
: Default password is public and should not be trusted in the wild.
Warning
config.SQLALCHEMY_DATABASE_URI
should be set to avoid loss of data.
Waitress configuration#
Additionnal parameter for waitress (wsgi engine) can be set using WAITRESS_OPTS
.
See waitress-serve manual .
Build cafannecy/collectives docker#
On a machine with docker, perform these steps to build
the version vX.X
:
docker build -t cafannecy/collectives:vX.X https://github.com/Club-Alpin-Annecy/collectives.git#vX.X
Then, it can be published by:
docker login # if required
docker push cafannecy/collectives:vx4