-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
65 lines (59 loc) · 1.25 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
services:
analytics-db:
image: postgres:13
environment:
POSTGRES_USER: user
POSTGRES_PASSWORD: password
POSTGRES_DB: analytics-db
ports:
- "5432:5432"
volumes:
- analytics_data:/var/lib/postgresql/data
- ./analytics/init.sql:/docker-entrypoint-initdb.d/init.sql
healthcheck:
test: ["CMD-SHELL", "pg_isready -U user -d analytics-db"]
interval: 5s
timeout: 5s
retries: 5
mongo-db:
image: mongo:4.4
hostname: testmongodb
environment:
MONGO_INITDB_DATABASE: url_db
MONGO_INITDB_ROOT_USERNAME: root
MONGO_INITDB_ROOT_PASSWORD: example
ports:
- "27017:27017"
volumes:
- mongo_data:/data/db
url-shortener:
build: ./url-shortener
depends_on:
- mongo-db
ports:
- "5001:5001"
qr-code-generator:
build: ./qr-code-generator
ports:
- "5002:5002"
analytics:
build: ./analytics
depends_on:
analytics-db:
condition: service_healthy
links:
- analytics-db
ports:
- "5003:5003"
api:
build: ./api
depends_on:
- url-shortener
- qr-code-generator
- analytics
- mongo-db
ports:
- "5000:5000"
volumes:
analytics_data:
mongo_data: