Skip to content

feat: Dockerize application for development #51

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 1, 2025
Merged

Conversation

RandomProgramm3r
Copy link
Owner

This commit introduces a complete Docker and Docker Compose setup, enabling developers to build, run, and test the application in a consistent, isolated environment. It also prepares the application for containerized deployments.

Changes include:

  • Dockerfile: A multi-stage build process is implemented. It separates build-time dependencies from the final runtime image, creating a smaller and more secure production artifact. gunicorn is used as the application server.
  • docker-compose.yml: Defines the app and redis services, linking them together.
  • settings.py:
    • Configured to connect to the Redis service for Django's caching backend. - Added settings for the Anti-fraud service URLs. - All new configurations (Redis URL, Anti-fraud URLs) are driven by environment variables for flexibility and security, with sensible defaults for local development.
  • requirements/prod.txt: Added django-redis and requests.
  • .dockerignore: Updated to exclude unnecessary files from the Docker build context, ensuring faster and smaller builds.

This commit introduces a complete Docker and Docker Compose setup, enabling developers to build, run, and test the application in a consistent, isolated environment. It also prepares the application for containerized deployments.

Changes include:
 - **Dockerfile**: A multi-stage build process is implemented. It separates build-time dependencies from the final runtime image, creating a smaller and more secure production artifact. `gunicorn` is used as the application server.
 - **docker-compose.yml**: Defines the `app` and `redis` services, linking them together.
- **settings.py**:
     - Configured to connect to the Redis service for Django's caching backend.
     - Added settings for the Anti-fraud service URLs.
     - All new configurations (Redis URL, Anti-fraud URLs) are driven by environment variables for flexibility and security, with sensible defaults for local development.
 - **requirements/prod.txt**: Added `django-redis` and `requests`.
 - **.dockerignore**: Updated to exclude unnecessary files from the Docker build context, ensuring faster and smaller builds.
@RandomProgramm3r RandomProgramm3r merged commit fe3e48c into main Jul 1, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant