-
Notifications
You must be signed in to change notification settings - Fork 26
/
production.yml
117 lines (106 loc) · 2.8 KB
/
production.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
116
117
version: '3'
volumes:
production_postgres_data: {}
production_postgres_data_backups: {}
production_traefik: {}
production_traefik_logs: {}
production_elasticsearch_data: {}
production_minio_data: {}
production_prometheus_data: {}
production_grafana_data: {}
services:
django: &django
build:
context: .
dockerfile: ./compose/production/django/Dockerfile
image: bazaar_production_django
depends_on:
- postgres
- redis
- elasticsearch
- minio
- mobsf
env_file:
- ./.envs/.production/.django
- ./.envs/.production/.postgres
command: /start
worker:
<<: *django
image: bazaar_production_worker
depends_on:
- redis
- postgres
- elasticsearch
- minio
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:7.10.2
hostname: elasticsearch
environment:
- "discovery.type=single-node"
- "ES_JAVA_OPTS=-Xms6000m -Xmx6000m"
- bootstrap.memory_lock=true
ulimits:
memlock:
soft: -1
hard: -1
volumes:
- production_elasticsearch_data:/usr/share/elasticsearch/data
mobsf:
image: opensecurity/mobile-security-framework-mobsf:v3.4.6
hostname: mobsf
environment:
- "MOBSF_API_ONLY=1"
- "MOBSF_API_KEY=515d3578262a2539cd13b5b9946fe17e350c321b91faeb1ee56095430242a4a9"
minio:
image: minio/minio:RELEASE.2020-11-13T20-10-18Z
volumes:
- production_minio_data:/data
env_file:
- ./.envs/.production/.django
command: server /data
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
interval: 30s
timeout: 20s
retries: 3
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