-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.prod.yml
65 lines (63 loc) · 1.51 KB
/
docker-compose.prod.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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
services:
db:
container_name: db
image: postgres:16-alpine
ports:
- '5432:5432'
environment:
- POSTGRES_PASSWORD=${PGPASSWORD}
- POSTGRES_USER=${PGUSER}
- POSTGRES_DB=${POSTGRES_DB}
volumes:
- ./data/db:/var/lib/postgresql/data/
networks:
custom_network:
aliases:
- ${PROJECT_NAME}_db.local
frontend:
container_name: frontend
build:
context: ../nihongo-jouzu-frontend
dockerfile: Dockerfile
restart: always #change if you don't want your container restarting
environment:
- NODE_ENV=production
ports:
- 3000:3000
depends_on:
- backend
networks:
custom_network:
aliases:
- ${PROJECT_NAME}_react.local
backend:
container_name: backend
build:
context: ./backend
dockerfile: Dockerfile
environment:
- PGPASSWORD=${PGPASSWORD}
- PGUSER=${PGUSER}
- POSTGRES_DB=${POSTGRES_DB}
- DATABASE_HOST=db
- DJANGO_SUPERUSER_USERNAME=${DJANGO_SUPERUSER_USERNAME}
- DJANGO_SUPERUSER_PASSWORD=${DJANGO_SUPERUSER_PASSWORD}
- DJANGO_SUPERUSER_EMAIL=${DJANGO_SUPERUSER_EMAIL}
ports:
- '8000:8000'
volumes:
- ./backend:/app/backend
- ./static:/app/backend/static
depends_on:
- db
networks:
custom_network:
aliases:
- ${PROJECT_NAME}_django.local
networks:
custom_network:
name: ${PROJECT_NAME}
driver: bridge
volumes:
node_modules:
driver: local