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
Attachments
Activity
Field | Original Value | New Value |
---|---|---|
Summary | Reorganize docker-compose and dockerfiles | Reorganize docker-compose and dockerfiles for feedback plugin |
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}} |
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}} |
Fix Version/s | N/A [ 27305 ] |
Status | Open [ 1 ] | In Progress [ 3 ] |
Remote Link | This issue links to "PR #15 (Web Link)" [ 35208 ] |
Remote Link | This issue links to "PR #15 (Web Link)" [ 35212 ] |
Assignee | Anel Husakovic [ anel ] | Faustin Lammler [ faust ] |
Status | In Progress [ 3 ] | In Review [ 10002 ] |
Resolution | Fixed [ 1 ] | |
Status | In Review [ 10002 ] | Closed [ 6 ] |
Remaining Estimate | 0d [ 0 ] |
Workflow | MariaDB v4 [ 176568 ] | MariaDB Foundation v1 [ 188732 ] |
Added PR 15