-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.prod.yml
141 lines (127 loc) · 3.41 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
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
version: "3.1"
services:
postgres:
environment:
- POSTGRES_USER=pandama
- POSTGRES_PASSWORD=pandama
- POSTGRES_DB=pandama
ports:
- "5432:5432"
volumes:
- ./data/postgres:/var/lib/postgresql/data
redis:
command: redis-server --requirepass pandama
ports:
- "6379:6379"
volumes:
- ./data/redis:/data
mongodb:
environment:
- MONGO_INITDB_ROOT_USERNAME=pandama
- MONGO_INITDB_ROOT_PASSWORD=pandama
- MONGO_INITDB_DATABASE=pandama
ports:
- "27017:27017"
volumes:
- ./data/mongo:/data/db
neo4j:
image: neo4j:4.4.3
environment:
- NEO4J_AUTH=neo4j/pandama
ports:
- "7474:7474"
- "7687:7687"
volumes:
- ./data/neo4j:/data
elasticsearch:
environment:
- discovery.type=single-node
- ELASTIC_PASSWORD=pandama
- http.host=0.0.0.0
- xpack.security.enabled=false
- ES_JAVA_OPTS=-Xms750m -Xmx750m
ports:
- "9200:9200"
volumes:
- ./data/elasticsearch:/usr/share/elasticsearch/data
rabbitmq:
environment:
- RABBITMQ_SSL_CA_FILE=/certs/rabbitmq/ca_certificate.pem
- RABBITMQ_SSL_CERT_FILE=/certs/rabbitmq/server_certificate.pem
- RABBITMQ_SSL_KEY_FILE=/certs/rabbitmq/server_key.pem
- RABBITMQ_DEFAULT_USER=pandama
- RABBITMQ_DEFAULT_PASS=pandama
ports:
- "15672:15672"
- "15671:15671"
- "5672:5672"
- "5671:5671"
volumes:
- ./data/rabbitmq:/var/lib/rabbitmq
- ./certs/rabbitmq:/certs/rabbitmq
kibana:
ports:
- "5601:5601"
volumes:
- ./config/kibana.yml:/usr/share/kibana/config/kibana.yml
logstash:
ports:
- "5044:5044"
- "5001:5000/tcp"
- "5001:5000/udp"
- "9600:9600"
volumes:
- ./config/logstash.conf:/usr/share/logstash/pipeline/logstash.conf
apm:
ports:
- "8200:8200"
volumes:
- ./config/apm.yml:/usr/share/apm/config/apm.yml
filebeat:
command: filebeat -e -d "*"
volumes:
- ./logs:/logs
- ./config/filebeat.yml:/usr/share/filebeat/filebeat.yml
celery_worker:
env_file: ./env/.env.prod
command: bash ./wait-for-it.sh postgres:5432 -t 0 -s --
sh -c "
python3 manage.py makemigrations commons &&
python3 manage.py makemigrations customers &&
python3 manage.py makemigrations catalogs &&
python3 manage.py makemigrations carts &&
python3 manage.py makemigrations products &&
python3 manage.py makemigrations orders &&
python3 manage.py migrate &&
celery -A config worker -c 1 --beat -l INFO"
volumes:
- ./code:/code
- ./logs:/logs
celery_beat:
env_file: ./env/.env.prod
command: bash ./wait-for-it.sh postgres:5432 -t 0 -s --
celery -A config beat -l INFO --scheduler django_celery_beat.schedulers:DatabaseScheduler
environment:
- POSTGRES_USER=pandama
- POSTGRES_PASSWORD=pandama
- POSTGRES_DB=pandama
volumes:
- ./code:/code
- ./logs:/logs
web:
env_file: ./env/.env.prod
command:
bash ./wait-for-it.sh postgres:5432 -t 0 -s --
python3 manage.py runserver 0.0.0.0:8000
volumes:
- ./code:/code
- ./logs:/logs
ports:
- "8000:8000"
nginx:
ports:
- 80:80
volumes:
- ./config/nginx:/etc/nginx/conf.d
- ./logs/nginx:/var/log/nginx
- ./static:/usr/share/nginx/html/static