This PR enhances the Docker Compose file and Dockerfiles to improve the build time of the Bayanat application. The changes include:
Using multi-stage builds in the Docker Compose file to eliminate unnecessary dependencies and intermediate layers, resulting in faster builds.
Modifying the Dockerfile for the Flask container to use a smaller base image (python:3.10-slim) to reduce the image size and build time.
Modifying the Dockerfile for the Celery container to use a smaller base image (python:3.10-slim) for faster builds.
Using build arguments in the Docker Compose file for environment variables, allowing for easier configuration.
Switching from bind mounts to named volumes for persistent data in the Docker Compose file to improve performance and simplify setup.
Summary of Changes
Modified the bayanat service in the Docker Compose file to use a smaller base image, added build arguments, and replaced bind mounts with named volumes.
Modified the celery service in the Docker Compose file to use a smaller base image and added build arguments.
Added a new flask/Dockerfile to use a smaller base image and install dependencies.
Added a new celery/Dockerfile to use a smaller base image and install dependencies.
Updated the POSTGRES_HOST and REDIS_HOST values in enferno/settings.py to use the service names defined in the Docker Compose file.
Please review and merge these changes to improve the build time of the Bayanat application.
Fixes #3.
To checkout this PR branch, run the following command in your terminal:
git checkout sweep/enhance-docker-compose_1
To get Sweep to edit this pull request, leave a comment below or in the code. Leaving a comment in the code will only modify the file but commenting below can change the entire PR.
Description
This PR enhances the Docker Compose file and Dockerfiles to improve the build time of the Bayanat application. The changes include:
python:3.10-slim
) to reduce the image size and build time.python:3.10-slim
) for faster builds.Summary of Changes
bayanat
service in the Docker Compose file to use a smaller base image, added build arguments, and replaced bind mounts with named volumes.celery
service in the Docker Compose file to use a smaller base image and added build arguments.flask/Dockerfile
to use a smaller base image and install dependencies.celery/Dockerfile
to use a smaller base image and install dependencies.POSTGRES_HOST
andREDIS_HOST
values inenferno/settings.py
to use the service names defined in the Docker Compose file.Please review and merge these changes to improve the build time of the Bayanat application.
Fixes #3.
To checkout this PR branch, run the following command in your terminal:
To get Sweep to edit this pull request, leave a comment below or in the code. Leaving a comment in the code will only modify the file but commenting below can change the entire PR.