forked from Digital-Prophets/itez-platform
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
124 lines (115 loc) · 2.57 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
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
version: "3"
services:
api: &api
ports:
- 8000:8000
build:
context: ./itez
dockerfile: ./compose/local/django/Dockerfile
args:
STATIC_URL: "/static/"
restart: unless-stopped
networks:
- itez-backend-tier
links:
- db
depends_on:
- db
- redis
- jaeger
volumes:
- ./itez/:/app:z
# shared volume between worker and api for media
- itez-media:/itez/itez/media
command: /start
env_file: common.env
environment:
- JAEGER_AGENT_HOST=jaeger
- FRONTEND_URL=http://localhost:3000/
frontend:
build:
context: ./itez-frontend
dockerfile: Dockerfile
restart: unless-stopped
container_name: itez-frontend
depends_on:
- api
volumes:
- ./itez-frontend/:/app:z
# http://jdlm.info/articles/2016/03/06/lessons-building-node-app-docker.html
- /app/node_modules/
command: npm run dev
ports:
- "3000:3000"
db:
image: kartoza/postgis:9.6-2.4
restart: always
container_name: db
volumes:
- itez-db:/var/lib/postgresql/data:Z
environment:
- ALLOW_IP_RANGE=0.0.0.0/0
- POSTGRES_USER=docker
- POSTGRES_PASS=docker
- POSTGRES_DBNAME=itez
- POSTGRES_MULTIPLE_EXTENSIONS=postgis,hstore,postgis_topology,postgis_raster,pgrouting
healthcheck:
test: ["CMD-SHELL", "pg_isready -U docker"]
timeout: 10s
retries: 5
networks:
- itez-backend-tier
ports:
- "5432:5432"
redis:
image: library/redis:5.0-alpine
ports:
- 6379:6379
restart: unless-stopped
networks:
- itez-backend-tier
volumes:
- itez-redis:/data
worker:
<<: *api
image: itez_local_celeryworker
restart: unless-stopped
networks:
- itez-backend-tier
container_name: celeryworker
depends_on:
- redis
- mailhog
env_file: common.env
ports: []
command: /start-celeryworker
jaeger:
image: jaegertracing/all-in-one
ports:
- "5775:5775/udp"
- "6831:6831/udp"
- "6832:6832/udp"
- "5778:5778"
- "16686:16686"
- "14268:14268"
- "9411:9411"
restart: unless-stopped
networks:
- itez-backend-tier
mailhog:
image: mailhog/mailhog
ports:
- 1025:1025 # smtp server
- 8025:8025 # web ui. Visit http://localhost:8025/ to check emails
restart: unless-stopped
networks:
- itez-backend-tier
volumes:
itez-db:
driver: local
itez-redis:
driver: local
itez-media:
networks:
itez-backend-tier:
driver: bridge