-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
98 lines (91 loc) · 2.53 KB
/
docker-compose.yaml
File metadata and controls
98 lines (91 loc) · 2.53 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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
services:
db:
container_name: digital_mary_db
image: postgis/postgis:18-3.6
# postgis only supports the linux/amd64 platform
platform: linux/amd64
ports:
- "15432:5432"
volumes:
- .data/postgres:/var/lib/postgresql
environment:
POSTGRES_DB: digital_mary
POSTGRES_USER: digital_mary
POSTGRES_PASSWORD: password
healthcheck:
test: pg_isready -U digital_mary -d digital_mary && psql -U digital_mary -d digital_mary -c 'SELECT 1;' || exit 1
interval: 2s
retries: 120
nginx:
container_name: digital_mary_nginx
image: nginx:1.29-alpine
volumes:
# config
- ./docker/nginx.conf:/etc/nginx/nginx.conf
# mount app media and static content
- .data/media:/media:ro
# - .data/static:/static:ro # do not mount in development mode
ports:
- "8080:80"
healthcheck:
test: service nginx status || exit 1
interval: 2s
retries: 120
depends_on:
app:
condition: service_healthy
vite:
container_name: digital_mary_vite
build:
context: .
target: digital-mary-vite
command: yarn dev
ports:
- "5173:5173"
volumes:
# code for development
- ./digital_mary_vite:/app
# use the container's node_modules folders (don't override with local dev)
- /app/node_modules
app:
container_name: digital_mary_app
# image: ghcr.io/sfu-dhil/digital-mary-django
build:
context: .
target: digital-mary
ports:
- "8888:80"
volumes:
# code for development
- .:/app
# files uploads
- .data/media:/media
# # persist static outside of container so it can be shared with nginx
# - .data/static:/app/static # do not mount in development mode
# use the container's node_modules folders (don't override with local dev)
- /app/node_modules
environment:
DEBUG: True
DB_HOST: db
DB_NAME: digital_mary
DB_USER: digital_mary
DB_PASSWORD: password
EMAIL_HOST: mail
EMAIL_HOST_USER: digital_mary
EMAIL_HOST_PASSWORD: password
EMAIL_CHALLENGE_RECIPIENTS: email_challenge_recipient@test.com
MEDIA_FOLDER_UID: 101
MEDIA_FOLDER_GID: 101
GUNICORN_RELOAD: True
healthcheck:
test: curl --fail http://localhost/health_check/ || exit 1
interval: 2s
retries: 120
depends_on:
db:
condition: service_healthy
mail:
container_name: digital_mary_mail
image: jcalonso/mailhog:v1.0.1
ports:
- "8025:8025"