-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathcompose.override.production.yml
More file actions
140 lines (126 loc) · 3.12 KB
/
compose.override.production.yml
File metadata and controls
140 lines (126 loc) · 3.12 KB
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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
---
volumes:
production_postgres_data: {}
production_postgres_data_backups: {}
production_redis_data: {}
production_nginx: {}
services:
django:
build:
dockerfile: ./compose/production/django/Dockerfile
image: scram_production_django
logging:
driver: journald
options:
tag: scram-django
env_file:
- ./.envs/.production/.django
- ./.envs/.production/.postgres
- path: '/etc/vault.d/secrets/kv_root_security.env'
required: false
volumes:
- ./staticfiles:/staticfiles
healthcheck:
test: ["CMD", "curl", "-f", "http://django:5000/process_updates/"]
postgres:
logging:
driver: journald
options:
tag: scram-postgres
volumes:
- production_postgres_data:/var/lib/postgresql:Z
- production_postgres_data_backups:/backups:z
env_file:
- ./.envs/.production/.postgres
- /etc/vault.d/secrets/kv_root_security.env
deploy:
replicas: ${POSTGRES_ENABLED:-0}
nginx:
image: nginx:1.19
logging:
driver: journald
options:
tag: scram-nginx
restart: on-failure:5
depends_on:
- django
networks:
default: {}
sysctls:
- net.ipv6.conf.all.disable_ipv6=0
environment:
- HOSTNAME=${HOSTNAME}
volumes:
- ./compose/production/nginx/nginx.conf:/etc/nginx/conf.d/default.conf
- /etc/letsencrypt/live/${HOSTNAME}/fullchain.pem:/etc/ssl/server.crt
- /etc/letsencrypt/live/${HOSTNAME}/privkey.pem:/etc/ssl/server.key
- ./staticfiles:/staticfiles
ports:
- "443:443"
- "80:80"
redis:
logging:
driver: journald
options:
tag: scram-redis
volumes:
- production_redis_data:/var/lib/redis:Z
gobgp:
logging:
driver: journald
options:
tag: scram-gobgp
volumes:
- ./gobgp_config:/config:z
networks:
default: {}
peering:
gw_priority: 1000
ipv4_address: ${SCRAM_V4_ADDRESS}
ipv6_address: ${SCRAM_V6_ADDRESS}
ports:
- "179:179"
- "50051"
translator:
logging:
driver: journald
options:
tag: scram-translator
env_file:
- ./.envs/.production/.translator
celery-worker:
volumes:
- ./scheduler/src/scheduler/:/app/scheduler:ro
env_file:
- ./.envs/.production/.celery
celery-beat:
command:
["celery", "-A", "scheduler.app:scram_api_scheduler", "beat", "--loglevel=info"]
env_file:
- ./.envs/.production/.celery
flower:
env_file:
- ./.envs/.production/.celery
command:
["celery", "-A", "scheduler.app:scram_api_scheduler", "flower", "--port=5555"]
ports:
- "5555:5555"
networks:
default:
enable_ipv6: true
ipam:
driver: default
config:
- subnet: 0200:c0:ff:ee::/64
peering:
enable_ipv6: true
driver: macvlan
driver_opts:
parent: ${SCRAM_PEERING_IFACE}
ipam:
driver: default
config:
- subnet: ${SCRAM_V4_SUBNET}
gateway: ${SCRAM_V4_GATEWAY}
- subnet: ${SCRAM_V6_SUBNET}
gateway: ${SCRAM_V6_GATEWAY}