Details
-
Task
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
N/A
-
None
Description
Feedback plugin docker folder has currently of 3 applications
- web application, Django, in folder docker/app
- database application MariaDB, in folder docker/mariadb
- nginx application in folder docker/nginx
Each application has it's related Dockerfile as well as configuration settings, that
may and need to be optimized.
Dockerfiles changes that needs to be done for mariadb:
- do not use pip installation and related .py script,
- delete .py script
- create new bash script to initialize database and generate smaller image
Dockerfiles changes that needs to be done for app:
- do not install mariadb to increase generated image size. Instead create networks in docker-compose file that will ensure proper inter container communication and set proper settings in app.settings.py.
- do not install gunicorn as dependency, but rather define it as an requirements to be installed with pip.
- do not create logs folder, but rather mount that folder during docker-compose
Dockerfiles changes that needs to be done for nginx:
- remove Dockerfile and use vanilla nginx and mount needed configuration in docker-compose
This task should also optimize and cleanup things in docker compose like
- environment variables, use proper one for db service to create the user
- add networks tag in docker-compose for proper inter container communication
- mount volume for gunicorn logs directory
- use mariadb configuration file container path
- bump the docker compose version
- add healty check for mariadb container
- use long syntax for conditions on web service to wait on mariadb service to be healthy
- remove db dependency for nginx
Added PR 15