Repository navigation
Expand file tree
/
Copy pathproduction.yml
More file actions
157 lines (144 loc) · 3.97 KB
/
Copy pathproduction.yml
File metadata and controls
157 lines (144 loc) · 3.97 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
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
volumes:
production_postgres_data: {}
production_postgres_data_backups: {}
production_traefik: {}
production_traefik_logs: {}
production_elasticsearch_data: {}
production_rustfs_data: {}
production_prometheus_data: {}
production_grafana_data: {}
services:
django: &django
build:
context: .
dockerfile: ./compose/production/django/Dockerfile
image: bazaar_production_django
depends_on:
postgres:
condition: service_started
redis:
condition: service_started
rustfs:
condition: service_started
mobsf:
condition: service_started
elasticsearch:
condition: service_healthy
env_file:
- ./.envs/.production/.django
- ./.envs/.production/.postgres
- ./.envs/.production/.elastic
command: /start
worker:
<<: *django
image: bazaar_production_worker
depends_on:
redis:
condition: service_started
postgres:
condition: service_started
rustfs:
condition: service_healthy
elasticsearch:
condition: service_healthy
ports: []
command: /start-worker
postgres:
build:
context: .
dockerfile: ./compose/production/postgres/Dockerfile
image: bazaar_production_postgres
volumes:
- production_postgres_data:/var/lib/postgresql/data:Z
- production_postgres_data_backups:/backups:z
env_file:
- ./.envs/.production/.postgres
traefik:
build:
context: .
dockerfile: ./compose/production/traefik/Dockerfile
image: bazaar_production_traefik
depends_on:
- django
volumes:
- production_traefik:/etc/traefik/acme:z
- production_traefik_logs:/tmp/
ports:
- "0.0.0.0:80:80"
- "0.0.0.0:443:443"
redis:
image: redis:5.0
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:8.19.10
hostname: elasticsearch
env_file: ./.envs/.production/.elastic
environment:
- "discovery.type=single-node"
- "ES_JAVA_OPTS=-Xms6G -Xmx6G"
- bootstrap.memory_lock=true
- "xpack.security.enabled=false"
ulimits:
memlock:
soft: -1
hard: -1
volumes:
- production_elasticsearch_data:/usr/share/elasticsearch/data
healthcheck:
test:
[
"CMD-SHELL",
"curl -s --user elastic:$$ELASTICSEARCH_PASSWORD -X GET http://localhost:9200/_cluster/health?pretty | grep status | grep -Eq '(green|yellow)'"
]
interval: 10s
timeout: 5s
retries: 50
start_period: 20s
mobsf:
image: opensecurity/mobile-security-framework-mobsf:v4.5.3
hostname: mobsf
environment:
- "MOBSF_API_ONLY=1"
- "MOBSF_API_KEY=515d3578262a2539cd13b5b9946fe17e350c321b91faeb1ee56095430242a4a9"
- "MOBSF_NIAP_ENABLED=1"
- "MOBSF_CVSS_SCORE_ENABLED=1"
rustfs:
image: rustfs/rustfs:latest
volumes:
- production_rustfs_data:/data
env_file:
- ./.envs/.production/.django
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9000/health/ready"]
interval: 30s
timeout: 20s
retries: 3
rustfs-init:
image: rustfs/rc:latest
depends_on:
rustfs:
condition: service_healthy
env_file:
- ./.envs/.production/.django
entrypoint:
- /bin/sh
- -c
- |
until /usr/bin/rc alias set rustfs http://rustfs:9000 "$${RUSTFS_ACCESS_KEY}" "$${RUSTFS_SECRET_KEY}"; do
sleep 2
done
/usr/bin/rc ls rustfs/local-media >/dev/null 2>&1 || \
/usr/bin/rc mb rustfs/local-media
prometheus:
image: prom/prometheus
volumes:
- production_prometheus_data:/prometheus
- ./config/prometheus.conf:/etc/prometheus/prometheus.yml
command:
- '--config.file=/etc/prometheus/prometheus.yml'
- '--storage.tsdb.path=/prometheus'
grafana:
image: grafana/grafana
volumes:
- production_grafana_data:/var/lib/grafana:rw
env_file:
- ./.envs/.production/.grafana