-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
75 lines (70 loc) · 1.83 KB
/
docker-compose.yaml
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
services:
db:
container_name: intertidal_db
image: postgres:16.2
ports:
- "15432:5432"
volumes:
- .data/postgres:/var/lib/postgresql/data/pgdata
environment:
PGDATA: /var/lib/postgresql/data/pgdata
POSTGRES_DB: intertidal
POSTGRES_USER: intertidal
POSTGRES_PASSWORD: password
healthcheck:
test: ["CMD-SHELL", "pg_isready", "-U", "intertidal", "-d", "intertidal"]
interval: 2s
retries: 120
nginx:
container_name: intertidal_nginx
image: nginx:1.25
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"
depends_on:
app:
condition: service_healthy
app:
container_name: intertidal_app
# image: dhil/intertidal
build:
context: .
target: intertidal
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
environment:
DEBUG: True
DB_HOST: db
DB_NAME: intertidal
DB_USER: intertidal
DB_PASSWORD: password
EMAIL_HOST: mail
EMAIL_HOST_USER: intertidal
EMAIL_HOST_PASSWORD: password
MEDIA_FOLDER_UID: 101
MEDIA_FOLDER_GID: 101
GUNICORN_RELOAD: True
healthcheck:
test: ["CMD-SHELL", "curl --fail http://localhost/health_check/ || exit 1"]
interval: 2s
retries: 120
depends_on:
db:
condition: service_healthy
mail:
container_name: intertidal_mail
image: jcalonso/mailhog:v1.0.1
ports:
- "8025:8025"