-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
68 lines (63 loc) · 1.37 KB
/
docker-compose.yml
File metadata and controls
68 lines (63 loc) · 1.37 KB
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
services:
postgres:
image: postgres:15
container_name: postgres_db
restart: always
environment:
POSTGRES_DB: appdb
POSTGRES_USER: appuser
POSTGRES_PASSWORD: secretpassword
volumes:
- postgres_data:/var/lib/postgresql/data
networks:
- app_network
backend:
build: ./backend
container_name: django_backend
restart: always
command: gunicorn backend.wsgi:application --bind 0.0.0.0:8000
volumes:
- ./backend:/app
environment:
DJANGO_SECRET_KEY: supersecretkey
DJANGO_DEBUG: "False"
POSTGRES_DB: appdb
POSTGRES_USER: appuser
POSTGRES_PASSWORD: secretpassword
POSTGRES_HOST: postgres
POSTGRES_PORT: 5432
depends_on:
- postgres
networks:
- app_network
frontend:
build: ./frontend
container_name: nextjs_frontend
restart: always
command: npm run start
volumes:
- ./frontend:/app
environment:
NEXT_PUBLIC_API_URL: http://nginx/api
depends_on:
- backend
networks:
- app_network
nginx:
image: nginx:latest
container_name: nginx_proxy
restart: always
ports:
- "80:80"
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf:ro
depends_on:
- frontend
- backend
networks:
- app_network
volumes:
postgres_data:
networks:
app_network:
driver: bridge