-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathdocker-compose.yml
67 lines (64 loc) · 1.44 KB
/
docker-compose.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
services:
redis:
image: redis:5.0.14
ports:
- "6379:6379"
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 5s
retries: 5
volumes:
- redis-data:/data
web:
hostname: web
build:
context: .
dockerfile: Dockerfile-dev
image: pmg_flask
depends_on:
- postgres
- elastic
- redis
volumes:
- .:/app
environment:
- FLASK_DEBUG_CACHE=false
- REDIS_URL=redis://redis:6379/0
- SQLALCHEMY_DATABASE_URI=postgresql://pmg:pmg@postgres/pmg?client_encoding=utf8
- ES_SERVER=http://elastic:9200
- GOOGLE_ANALYTICS_ID=G-XN8MJJNSEE
- GOOGLE_TAG_MANAGER_ID=GTM-MMCNPLT6
- RUN_PERIODIC_TASKS=true
- MAIL_SUPPRESS_SEND=true
ports:
- "5000:5000"
command: python app.py runserver
extra_hosts:
- "pmg.test:127.0.0.1"
- "api.pmg.test:127.0.0.1"
postgres:
image: postgres:12.19
environment:
- POSTGRES_USER=pmg
- POSTGRES_DB=pmg
- POSTGRES_PASSWORD=pmg
volumes:
- db-data:/var/lib/postgresql/data
- ./docker-entrypoint-initdb.d:/docker-entrypoint-initdb.d
ports:
- "5433:5432"
elastic:
image: elastic
build:
context: .
dockerfile: docker-elasticsearch
volumes:
- es-data:/usr/share/elasticsearch/data
ports:
- "9200:9200"
- "9300:9300"
volumes:
db-data:
es-data:
redis-data: