Docker studies

To enable commandline autocompletion in linux: docker_autocomplete

Nice example of how to use Docker Compose and .env

full docker compose setup

We have the docker compose and overwrite in one directory with a .env file specifying environmental variables. Additional config dir has additional configuration information such as secret file for database connection.

Now the whole setup can be run with simple docker compose up -d command

Configuration Workflow with Docker

Its good to have the entire deployment configuration for a system captured ina set of artifacts that live in source control. It allows you do deploy any version of your application just by fetching the source at that version and runnign the deployment scripts. It also allows developers to quickly work on fixes by running the production stack locally and reproducing a bug in their own environment.

Docker Compose allows the variation between environments while still having deployment artifacts in source control.

Application composition

Not every environment need the whole stack and the override files allows handling htis.

Container configuration

Properties, published ports, volume paths: all these can be handled with overrides, along with isolated Docker networks for each applicatoin, allowing multiple envs on a single server

Application configuration

Amount of loggin, size of cache, features turned on of etc. Can be handled with combiation of override files, environment files and secrets.