-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathdocker-compose.yml
58 lines (58 loc) · 1.74 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
version: "3.9"
services:
django:
entrypoint: gunicorn --bind 0.0.0.0:8000 --capture-output --log-level info --log-file - backend.wsgi
restart: unless-stopped
build:
context: backend
dockerfile: Dockerfile
depends_on:
- pgbouncer
environment:
- DJANGO_SETTINGS_MODULE=backend.settings.dev
- CORS_ALLOWED_ORIGINS=${CORS_ALLOWED_ORIGINS}
- ALLOWED_HOSTS=${ALLOWED_HOSTS}
- DEFAULT_FROM_EMAIL=${DEFAULT_FROM_EMAIL}
- TZ=${TZ}
- DB_NAME=${DB_NAME}
- DB_HOST=pgbouncer
- DB_PORT=${DB_PORT}
- DB_USER=${DB_USER}
- DB_PASSWORD=${DB_PASSWORD}
nginx:
restart: unless-stopped
build:
context: .
dockerfile: nginx/Dockerfile
network: host
db:
image: postgres:15
restart: unless-stopped
volumes:
- ./db/data:/var/lib/postgresql/data
- ./db/conf:/etc/postgresql
- ./db/log:/var/log/postgresql
environment:
- POSTGRES_DB=${DB_NAME}
- POSTGRES_USER=${DB_USER}
- POSTGRES_PASSWORD=${DB_PASSWORD}
- TZ=${TZ}
pgbouncer:
restart: unless-stopped
build:
context: pgbouncer
dockerfile: Dockerfile
args:
VERSION: "1.18.0"
depends_on:
- db
ports:
- "127.0.0.1:${DB_PORT}:5432"
environment:
- DATABASE_URL=
- AUTH_TYPE=plain
- DB_HOST=db
- DB_PORT=5432
- DB_NAME=${DB_NAME}
- DB_USER=${DB_USER}
- DB_PASSWORD=${DB_PASSWORD}