-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.prod.yml
66 lines (66 loc) · 1.73 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
name: ${PROJECT_NAME}
services:
nginx:
container_name: ${NGINX_NAME}
restart: always
build:
context: .
dockerfile: ./.conf/production/nginx/Dockerfile
ports:
- ${SERVER_PORT}:${SERVER_PORT}
environment:
SERVER_HOST: ${SERVER_HOST}
SERVER_PORT: ${SERVER_PORT}
BACKEND_PROXY: ${BACKEND_NAME}:${BACKEND_PORT}
volumes:
- bc_static_files:/vol/static
- bc_media:/vol/media
- bc_logs:/var/log/nginx/back
depends_on:
- backend
backend:
container_name: ${BACKEND_NAME}
restart: always
build:
context: .
dockerfile: ./.conf/production/back/Dockerfile
environment:
BACKEND_PORT: ${BACKEND_PORT}
SERVER_URL: ${SERVER_URL}
SECRET_KEY: ${BACKEND_SECRET_KEY}
DEBUG: ${BACKEND_DEBUG}
ALLOWED_HOSTS: ${BACKEND_ALLOWED_HOSTS}
CSRF_TRUSTED_ORIGINS: ${CSRF_TRUSTED_ORIGINS}
DB_HOST: ${DB_HOST}
DB_PORT: ${DB_PORT}
DB_NAME: ${DB_NAME}
DB_USER: ${DB_USER}
DB_PASSWORD: ${DB_PASSWORD}
BACKEND_USE_EMAIL_FILE_SYSTEM: ${BACKEND_USE_EMAIL_FILE_SYSTEM}
MAILJET_API_KEY: ${MAILJET_API_KEY}
MAILJET_API_SECRET: ${MAILJET_API_SECRET}
volumes:
- bc_static_files:/vol/static
- bc_media:/vol/media
depends_on:
- db
db:
image: postgres:${DB_POSTGRES_VERSION}
container_name: ${DB_HOST}
restart: always
environment:
POSTGRES_DB: ${DB_NAME}
POSTGRES_USER: ${DB_USER}
POSTGRES_PASSWORD: ${DB_PASSWORD}
PGPORT: ${DB_PORT}
volumes:
- bc_db:/var/lib/postgresql/data
volumes:
bc_db:
name: ${VOLUME_DB}
bc_static_files:
name: ${VOLUME_STATIC_FILES}
bc_media:
name: ${VOLUME_MEDIA}
bc_logs:
name: ${VOLUME_LOGS}