-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
44 lines (44 loc) · 1 KB
/
docker-compose.yaml
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.9"
services:
shopping-list:
container_name: shopping-list
image: beschoenen/shopping-list:latest
restart: unless-stopped
networks:
- shopping-list
ports:
- "${PORT:-80}:80"
environment:
PORT: "80"
MONGO_HOST: "shopping-list-db"
MONGO_DB: "shopping-list"
entrypoint: ["npm", "run", "serve"]
depends_on:
- mongodb
volumes:
- .:/app
- /app/node_modules
healthcheck:
test: ["CMD-SHELL", "wget -O /dev/null http://localhost/version || exit 1"]
interval: 10s
timeout: 3s
retries: 5
start_period: 5s
mongodb:
container_name: shopping-list-db
image: mongo:4
restart: unless-stopped
networks:
- shopping-list
volumes:
- "./database:/data/db"
healthcheck:
test: echo 'db.runCommand("ping").ok' | mongo --quiet
interval: 10s
timeout: 3s
retries: 5
start_period: 5s
networks:
shopping-list:
name: shopping-list
driver: bridge