-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.production.yml
45 lines (41 loc) · 1.08 KB
/
docker-compose.production.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
version: '3.9'
services:
postgresql-db:
image: postgres:14-alpine
restart: unless-stopped
volumes:
- postgresqldb_data:/var/lib/postgresql/data
environment:
- POSTGRES_DB=saasboilerplatedb
- POSTGRES_USER=saasboilerplatedbuser
- POSTGRES_PASSWORD=saasboilerplatedbpassword
backend-django:
build:
context: ./backend
dockerfile: Dockerfile.production
image: saasboilerplate-backend:latest
command: gunicorn saasboilerplate.wsgi:application --bind 0.0.0.0:8000
restart: unless-stopped
volumes:
- static_volume:/home/app/backend/staticfiles
expose:
- 8000
env_file:
- ./backend/.env.production
depends_on:
- postgresql-db
nginx:
build:
context: ./
dockerfile: nginx/Dockerfile.production
image: saasboilerplate-nginx:latest
restart: unless-stopped
volumes:
- static_volume:/home/app/backend/staticfiles
ports:
- 80:80
depends_on:
- backend-django
volumes:
postgresqldb_data:
static_volume: