-
Notifications
You must be signed in to change notification settings - Fork 5
/
docker-compose.yml
110 lines (108 loc) · 2.13 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
version: '3.6'
services:
mongo:
container_name: ship-mongo
image: mongo:4.2
command: --replSet rs --bind_ip_all
environment:
- MONGO_INITDB_ROOT_USERNAME=root
- MONGO_INITDB_ROOT_PASSWORD=root
networks:
- ship
ports:
- 27017:27017
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- type: volume
source: mongodb
target: /data/db
- type: volume
source: mongodb-cfg
target: /data/configdb
mongo-replicator:
container_name: ship-mongo-replicator
build: ./api/mongo-replicator
environment:
- HOST=mongo
- PORT=27017
- USERNAME=root
- PASSWORD=root
- REPLICA_SET_NAME=rs
networks:
- ship
depends_on:
- mongo
redis:
container_name: ship-redis
image: redis:5.0.5
command: redis-server --appendonly yes
hostname: redis
networks:
- ship
ports:
- 6379:6379
api:
container_name: ship-api
build:
context: ./api
dockerfile: Dockerfile.dev
target: api
args:
APP_ENV: development
networks:
- ship
volumes:
- ./api/src:/app/src
ports:
- 3001:3001
depends_on:
- redis
- mongo-replicator
migrator:
container_name: ship-migrator
build:
context: ./api
dockerfile: Dockerfile.dev
target: migrator
args:
APP_ENV: development
networks:
- ship
volumes:
- ./api/src:/app/src
depends_on:
- mongo-replicator
scheduler:
container_name: ship-scheduler
build:
context: ./api
dockerfile: Dockerfile.dev
target: scheduler
args:
APP_ENV: development
networks:
- ship
volumes:
- ./api/src:/app/src
depends_on:
- mongo-replicator
web:
container_name: ship-web
build:
context: ./web
dockerfile: Dockerfile.dev
args:
APP_ENV: development
volumes:
- ./web/src:/app/src
- ./web/public:/app/public
networks:
- ship
ports:
- 3002:3002
networks:
ship:
name: ship-network
volumes:
mongodb:
mongodb-cfg: