-
-
Notifications
You must be signed in to change notification settings - Fork 22
Production Deployment
We are using a Digital Ocean managed instance of PostgreSQL. We have created the following database type.
- Memory: 1 GB RAM
- Compute: 1vCPU
- Disk: 10 GB
- Failover: Primary only
- Region: SFO2
- DB: PostgreSQL 11
A user has been created for the CodeBuddies Backend application: cb_app
.
Our Django application is packaged as a Docker image. It is deployed as a service using Docker Compose. It listens on port 8000 on the container network. This port is not exposed outside the container network as all inbound requests come from the web server. No volumes are mounted as all code and dependencies are contained within the image.
The table below outlines the environment variables that need to be set:
Environment Variable | Value | Description |
---|---|---|
DATABASE_URL |
URL of the PostgreSQL database including username and password | |
EMAIL_HOST |
Hostname of the mail server for outbound email |
Our web server acts as a reverse proxy in front of the Django application. We are using Nginx as the web server. it is deployed as a service using Docker Compose and exposes port 80 on the host network. All requests are forwarded to the Django application on port 8000.