-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
66 lines (66 loc) · 1.89 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
services:
proxy:
build:
dockerfile: ./proxy/Dockerfile
context: ./
restart: always
volumes:
- ./persist/media:/media
- ./persist/static:/static
ports:
- 80:80
depends_on:
- django
django:
depends_on:
- db
build:
dockerfile: Dockerfile
context: ./
target: dev
command: python manage.py runserver 0.0.0.0:8000
ports:
- "8000:8000"
volumes:
- ./persist/media:/media
- ./persist/static:/static
- ./persist/logs/backend:/log
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}
- LOGLEVEL=${LOGLEVEL}
- LOGPATH=${LOGPATH}
- ENABLE_REGISTRATION=${ENABLE_REGISTRATION}
- DJANGO_SUPERUSER_PASSWORD=${ADMIN_PASSWORD}
- DJANGO_SUPERUSER_EMAIL=${ADMIN_EMAIL}
- DJANGO_SUPERUSER_USERNAME=${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}
db:
image: postgres:14.5
ports:
- "5432:5432"
volumes:
- ./persist/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}"]
# pgadmin:
# container_name: pgadmin
# image: dpage/pgadmin4
# environment:
# - PGADMIN_DEFAULT_PASSWORD=${PGADMIN_PASSWORD}
# ports:
# - "5050:80"
# depends_on:
# - db