[MDBF-558] Reorganize docker-compose and dockerfiles for feedback plugin Created: 2023-04-13  Updated: 2023-04-14

Status: In Review
Project: MariaDB Foundation Development
Component/s: Feedback Plugin
Affects Version/s: N/A
Fix Version/s: N/A

Type: Task Priority: Major
Reporter: Anel Husakovic Assignee: Faustin Lammler
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 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


 Comments   
Comment by Anel Husakovic [ 2023-04-13 ]

Added PR 15

Comment by Anel Husakovic [ 2023-04-14 ]

Created PR #15 faust, cvicentiu please review.

Generated at Thu Feb 08 03:38:45 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.