Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Added a .dockerignore file to exclude unnecessary files from Docker context. Refactored Dockerfile to use multi-stage builds, pip cache, and offline wheel installation for faster and more reliable builds. Updated docker-compose.yml to mount .env as read-only.
This pull request introduces several improvements to the project's Docker setup, focusing on optimizing the Docker build process, improving dependency caching, and enhancing the development environment configuration. The changes also include updates to the
.env.exampleanddocker-compose.ymlfiles to streamline deployment and environment management.Docker build and environment improvements:
Major Dockerfile optimizations:
Dockerfileto use multi-stage builds, add pip caching for faster builds, separate dependency installation using wheels, and ensure a cleaner runtime image. Also added a health check placeholder and improved the executable build process with PyInstaller. (#DockerfileL1-R45)Dependency management:
pyinstallerand pinnedsetuptoolsinrequirements.build.txtto ensure consistent builds. (#requirements.build.txtR1-R2)Development environment and deployment configuration:
.dockerignorefile to exclude unnecessary files from Docker build context, improving build performance and reducing image size. (#.dockerignoreR1-R16)docker-compose.ymlto use thelatesttag for the image, mount the.envfile as read-only, and remove explicit port mapping (now handled elsewhere or by default). (#docker-compose.ymlL9-R14).env.exampleby removing unused variables related to image tagging and external port mapping. (#.env.exampleL4-L5)