-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
42 lines (39 loc) · 971 Bytes
/
Copy pathdocker-compose.yml
File metadata and controls
42 lines (39 loc) · 971 Bytes
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
version: '3.8'
services:
mongodb:
image: mongo
ports:
- '27017:27017'
command: mongod --quiet --logpath /dev/null
healthcheck:
test: echo 'db.runCommand("ping").ok' | mongo localhost:27017/test --quiet
interval: 10s
timeout: 2s
retries: 5
start_period: 5s
restart: always
volumes:
- mongodata:/data/db
networks:
- url-shortener-network
url-shortener:
build:
context: .
environment:
- MONGO_URI=mongodb://mongodb:27017/short-url
env_file:
- .env
ports:
- '${PORT}:${PORT}'
depends_on:
- mongodb
volumes:
- node_modules:/node_modules
networks:
- url-shortener-network
networks:
url-shortener-network:
driver: bridge
volumes:
mongodata:
node_modules: