generated from mikecebul/bases
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
45 lines (42 loc) · 893 Bytes
/
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
services:
payload:
build:
context: .
dockerfile: Dockerfile
args:
- ENV_FILE=.env.docker
restart: always
ports:
- '3000:3000'
volumes:
- payload-public:/app/public
networks:
- app-network
depends_on:
mongo:
condition: service_healthy
environment:
- NODE_ENV=production
env_file: .env.docker
# Ensure your DATABASE_URI uses 'mongo' as the hostname ie. mongodb://mongo/my-db-name
mongo:
image: mongo:latest
ports:
- '27017:27017'
command:
- --storageEngine=wiredTiger
volumes:
- mongo-data:/data/db
networks:
- app-network
healthcheck:
test: ["CMD", "mongo", "--eval", "db.adminCommand('ping')"]
interval: 10s
timeout: 5s
retries: 5
volumes:
mongo-data:
payload-public:
networks:
app-network:
driver: bridge