-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
78 lines (74 loc) · 1.7 KB
/
docker-compose.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
66
67
68
69
70
71
72
73
74
75
76
77
78
services:
hord_server:
build:
context: ./server
dockerfile: Dockerfile
container_name: hord_server
volumes:
- static_volume:/staticfiles
- media_volume:/mediafiles
environment:
- DEBUG=${DEBUG}
- DB_HOST=hord_db
- DB_NAME=${DB_NAME}
- DB_USER=${DB_USER}
- DB_PASS=${DB_PASS}
- SECRET_KEY=${DJANGO_SECRET_KEY}
- DJANGO_ALLOWED_HOSTS=${DJANGO_ALLOWED_HOSTS}
- CSRF_TRUSTED_ORIGINS=${CSRF_TRUSTED_ORIGINS}
depends_on:
- hord_db
links:
- hord_db:hord_db
expose:
- 8000
hord_db:
container_name: hord_db
image: postgres:15
restart: always
volumes:
- postgres-data:/var/lib/postgresql/data
environment:
- POSTGRES_DB=${DB_NAME}
- POSTGRES_USER=${DB_USER}
- POSTGRES_PASSWORD=${DB_PASS}
- POSTGRES_HOST=${DB_HOST}
ports:
- "5432:5432"
hord_client:
container_name: hord_client
restart: always
build:
context: ./client
dockerfile: Dockerfile
environment:
- DB_HOST=hord_db
- DB_NAME=${DB_NAME}
- DB_USER=${DB_USER}
- DB_PASS=${DB_PASS}
- SECRET_KEY=${DJANGO_SECRET_KEY}
- DJANGO_ALLOWED_HOSTS=${DJANGO_ALLOWED_HOSTS}
depends_on:
- hord_server
links:
- hord_server:hord_server
ports:
- "3000:3000"
nginx:
image: nginx:latest
restart: unless-stopped
ports:
- 80:80
- 443:443
volumes:
- ./nginx/conf.d/:/etc/nginx/conf.d/:ro
- /etc/letsencrypt/:/cert
- static_volume:/staticfiles
- media_volume:/mediafiles
depends_on:
- hord_client
- hord_server
volumes:
postgres-data:
static_volume:
media_volume: