-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.prd.yml
47 lines (46 loc) · 1.4 KB
/
docker-compose.prd.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
version: "3.7"
services:
proxy:
image: ghcr.io/iandday/plant_tracker_proxy:latest
restart: always
volumes:
- ./media:/media
- ./static:/static
ports:
- 80:80
depends_on:
- django
django:
image: ghcr.io/iandday/plant_tracker:latest
command: python manage.py runserver 0.0.0.0:8000
volumes:
- ./media:/media
- ./static:/static
environment:
- SECRET_KEY=${SECRET_KEY}
- JWT_SIGNING_KEY=${JWT_SIGNING_KEY}
- JWT_ACCESS_TOKEN_LIFETIME_MINUTES=${JWT_ACCESS_TOKEN_LIFETIME_MINUTES}
- JWT_ACCESS_REFRESH_LIFETIME_DAYS=${JWT_ACCESS_REFRESH_LIFETIME_DAYS}
- DEBUG=${DEBUG}
- ENABLE_REGISTRATION=${ENABLE_REGISTRATION}
- MEDIA_PATH=${MEDIA_PATH}
- ADMIN_PASSWORD=${ADMIN_PASSWORD}
- ADMIN_EMAIL=${ADMIN_EMAIL}
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_DB=${POSTGRES_DB}
- POSTGRES_HOST=db
- POSTGRES_PORT=5432
- DATABASE_URL=psql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@db:5432/${POSTGRES_DB}
depends_on:
- db
db:
image: postgres:14.5
volumes:
- ./db:/var/lib/postgresql/data
environment:
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_DB=${POSTGRES_DB}
healthcheck:
test: ["CMD-SHELL", "pg_isready -q -U ${POSTGRES_USER} -d ${POSTGRES_DB}"]