Uploaded image for project: 'MariaDB Foundation Development'
  1. MariaDB Foundation Development
  2. MDBF-558

Reorganize docker-compose and dockerfiles for feedback plugin

Details

    • Task
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • N/A
    • N/A
    • Feedback Plugin
    • 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

        Issue Links

          Activity

            anel Anel Husakovic created issue -
            anel Anel Husakovic made changes -
            Field Original Value New Value
            Summary Reorganize docker-compose and dockerfiles Reorganize docker-compose and dockerfiles for feedback plugin
            anel Anel Husakovic made changes -
            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}}
            anel Anel Husakovic made changes -
            Fix Version/s N/A [ 27305 ]
            anel Anel Husakovic made changes -
            Status Open [ 1 ] In Progress [ 3 ]
            anel Anel Husakovic made changes -

            Added PR 15

            anel Anel Husakovic added a comment - Added PR 15

            Created PR #15 faust, cvicentiu please review.

            anel Anel Husakovic added a comment - Created PR #15 faust , cvicentiu please review.
            anel Anel Husakovic made changes -
            anel Anel Husakovic made changes -
            Assignee Anel Husakovic [ anel ] Faustin Lammler [ faust ]
            Status In Progress [ 3 ] In Review [ 10002 ]

            Not relevant anymore.

            faust Faustin Lammler added a comment - Not relevant anymore.
            faust Faustin Lammler made changes -
            Resolution Fixed [ 1 ]
            Status In Review [ 10002 ] Closed [ 6 ]
            Remaining Estimate 0d [ 0 ]
            julien.fritsch Julien Fritsch made changes -
            Workflow MariaDB v4 [ 176568 ] MariaDB Foundation v1 [ 188732 ]

            People

              faust Faustin Lammler
              anel Anel Husakovic
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: