bird-lg
bird-lg copied to clipboard
Provide docker images
There seems to be some interest in providing Docker images (#37, #72)
Several questions need discussion and/or help:
- what is the release model? Is it fine to just provide a Docker image of the latest code? Sometimes we break the configuration syntax. Should we move to semver releases and provide a docker image per release?
- how to configure bird-lg running in a Docker image?
From the little knowledge I have of Docker, people seem to like passing configuration from an external source.
We can't really use env variables because the configuration has python objects. Maybe we could pass the config file to stdout of the python programs? I have no idea if gunicorn would allow this.
Flask has documentation about the different ways to configure it: https://flask.palletsprojects.com/en/1.1.x/config/ (nothing specific to Docker though)
Hi,
I highly recommend to provide docker images with explicit version tags. If using docker hub this could be automated using an appropriate auto-build rule. I personally do not like to provide :latest
image tags but most are people expecting them.
I would prefer the following setup:
- define env names for configuration (i.e.
BIRDLG_BIND_PORT
,BIRDLG_SHARED_SECRET
, ...) and set them to sane defaults (SHARED_SECRET
should not be defined) - provide a config stub which reads the settings from
os.environ
and crashes if something essential likeSHARED_SECRET
is missing -
ACCESS_LIST
can be build from a comma separated string
The config file can be still mapped into the container in case the user want's a more complicated configuration.