-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-stack.yml
44 lines (40 loc) · 955 Bytes
/
docker-stack.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
version: '3.1'
services:
vue:
image: 0x24d/final-year-project-client:latest
ports:
- "8080:3000"
environment:
- NODE_ENV=development
deploy:
replicas: 2
express:
image: 0x24d/final-year-project-server:latest
ports:
- "8081:3000"
environment:
- NODE_ENV=development
- MONGO_USERNAME=root
- MONGO_PASSWORD=root
- MONGO_HOSTNAME=mongo
- MONGO_PORT=27017
- MONGO_DATABASE_NAME=blogPostDb
deploy:
replicas: 2
mongo:
image: mongo
ports:
- "27017:27017"
environment:
- MONGO_INITDB_ROOT_USERNAME=root
- MONGO_INITDB_ROOT_PASSWORD=root
- MONGO_INITDB_DATABASE=blogPostDb
healthcheck:
test: "[ `echo 'db.runCommand(\"ping\").ok' | mongo localhost/blogPostDb --quiet` ] && echo 0 || echo 1"
interval: 5s
timeout: 5s
retries: 3
volumes:
- mongo-data:/data/db
volumes:
mongo-data: