-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
78 lines (70 loc) · 1.46 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
version: '3.5'
services:
# Services
shipment:
restart: always
build: ./neocargo-service-shipment
depends_on:
- datastore
- vessel
ports:
- 50051:50051
environment:
MICRO_SERVER_ADDRESS: ":50051"
env_file:
- config.env
vessel:
restart: always
build: ./neocargo-service-vessel
depends_on:
- datastore
ports:
- 50052:50051
environment:
MICRO_SERVER_ADDRESS: ":50051"
env_file:
- config.env
user:
build: ./neocargo-service-user
depends_on:
- database
ports:
- 50053:50051
environment:
MICRO_SERVER_ADDRESS: ":50051"
WAIT_HOSTS: database:5432
env_file:
- config.env
# Commands
cli:
build: ./neocargo-cli-shipment
depends_on:
- datastore
- shipment
user-cli:
build: ./neocargo-cli-user
depends_on:
- database
- user
# Database tier
datastore:
image: mongo # official mongodb image
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
command: mongod --logpath=/dev/null
database:
image: postgres:alpine
container_name: "database"
restart: always
environment:
POSTGRES_PASSWORD: "password"
POSTGRES_USER: "postgres"
POSTGRES_DB: "neocargo"
ports:
- 5432:5432