-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.prod.yml
115 lines (104 loc) · 2.57 KB
/
docker-compose.prod.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
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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
version: "3.7"
x-backend-environment: &base-backend-environment
- SECRET_KEY=${SECRET_KEY}
- DEBUG=0
- DEBUG_SQL=0
- HOST_SITE=${HOST_SITE}
- ADMIN_DIR=${ADMIN_DIR}
- POSTGRES_DB=trcustoms
- POSTGRES_USER=root
- POSTGRES_PASSWORD=root
- AWS_ACCESS_KEY_ID
- AWS_SECRET_ACCESS_KEY
- AWS_STORAGE_BUCKET_NAME
- AWS_S3_ENDPOINT_URL
- AWS_S3_CUSTOM_DOMAIN
- USE_AWS_STORAGE
- EMAIL_HOST
- EMAIL_PORT
- EMAIL_HOST_USER
- EMAIL_HOST_PASSWORD
- EMAIL_USE_TLS
- EMAIL_USE_SSL
x-base-trcustoms: &base-trcustoms
restart: always
x-base-trcustoms-backend: &base-trcustoms-backend
<<: *base-trcustoms
environment: *base-backend-environment
build:
context: .
dockerfile: ./services/backend/Dockerfile
volumes:
- ./backend/trcustoms/:/app/trcustoms/
- ./backend/volumes/cache/:/app/cache/
- ./backend/volumes/uploads/:/app/uploads/
- ./backend/volumes/django_static/:/app/django_static/
- ./services/backend/entrypoint.sh:/usr/local/bin/entrypoint.sh
- ./pyproject.toml:/pyproject.toml
- /tmp:/tmp
networks:
- trcustoms
depends_on:
- trcustoms-redis
- trcustoms-db
services:
trcustoms:
<<: *base-trcustoms-backend
command: uwsgi
trcustoms-celery:
<<: *base-trcustoms-backend
command: celery
trcustoms-celery-beat:
<<: *base-trcustoms-backend
command: celery-beat
trcustoms-db:
<<: *base-trcustoms
image: postgres:14.0
environment: *base-backend-environment
expose:
- 5432
volumes:
- ./backend/volumes/pgdata:/var/lib/postgresql/data
networks:
- trcustoms
trcustoms-redis:
<<: *base-trcustoms
image: redis:6
expose:
- 6379
networks:
- trcustoms
trcustoms-nginx:
<<: *base-trcustoms
build:
context: .
dockerfile: ./services/nginx/Dockerfile_prod
args:
- BUILD_DATE=${BUILD_DATE}
- BUILD_VERSION=${BUILD_VERSION}
- HOST_SITE=${HOST_SITE}
- ADMIN_DIR=${ADMIN_DIR}
networks:
- trcustoms
ports:
- mode: host
protocol: tcp
published: ${TRCUSTOMS_PORT}
target: 8000
depends_on:
- trcustoms
volumes:
- ./backend/volumes/django_static:/app/backend/django_static
- ./backend/volumes/uploads:/app/backend/django_uploads
trcustoms-prerender:
<<: *base-trcustoms-backend
build:
context: ./services/prerender/
volumes:
- ./services/prerender/plugins/:/app/plugins/
- ./services/prerender/server.js:/app/server.js
networks:
- trcustoms
networks:
trcustoms:
external: false