-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathcompose.yml
39 lines (37 loc) · 876 Bytes
/
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
services:
backend:
restart: always
build:
dockerfile: Dockerfile
ports:
- "8080:8080"
environment:
PORT: 8080
NODE_ENV: production
NODE_OPTIONS: --enable-source-maps
MONGODB_URI: mongodb://root:octocat@mongo:27017
# env_file:
# - backend/.env
depends_on:
mongo:
condition: service_healthy
volumes:
- ./:/src
mongo:
image: mongo
restart: always
ports:
- '27017:27017'
environment:
MONGO_INITDB_ROOT_USERNAME: root
MONGO_INITDB_ROOT_PASSWORD: octocat
volumes:
- mongo-data:/data/db
healthcheck:
test: ["CMD", "mongosh", "--eval", "db.adminCommand('ping')", "-u", "root", "-p", "octocat", "--authenticationDatabase", "admin"]
interval: 10s
timeout: 5s
retries: 10
start_period: 20s
volumes:
mongo-data: