-
Notifications
You must be signed in to change notification settings - Fork 231
/
Copy pathdocker-compose.yml
67 lines (59 loc) · 1.3 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
version: '3.5'
services:
# Services
consignment:
restart: always
build: ./shippy-service-consignment
depends_on:
- datastore
- vessel
links:
- datastore
ports:
- 50051:50051
environment:
MICRO_SERVER_ADDRESS: ":50051"
DB_HOST: "mongodb://datastore:27017"
vessel:
restart: always
build: ./shippy-service-vessel
ports:
- 50052:50051
environment:
MICRO_SERVER_ADDRESS: ":50051"
DB_HOST: "mongodb://datastore:27017"
user:
restart: always
build: ./shippy-service-user
ports:
- 50053:50051
environment:
MICRO_ADDRESS: ":50051"
DB_HOST: "database"
DB_USER: "admin"
DB_PASSWORD: "password"
DB_NAME: "postgres"
# Commands
cli:
build: ./shippy-cli-consignment
user-cli:
build: ./shippy-cli-user
# Database tier
datastore:
image: mongo
container_name: datastore
environment:
- MONGO_DATA_DIR=/data/db
- MONGO_LOG_DIR=/dev/null
volumes:
- ./data/db:/data/db # ensures data persistence between restarting
ports:
- 27017:27017
command: mongod --logpath=/dev/null
database:
image: postgres:alpine
environment:
POSTGRES_PASSWORD: "password"
POSTGRES_USER: "admin"
ports:
- 5432:5432