-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.dev.yml
45 lines (40 loc) · 954 Bytes
/
docker-compose.dev.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
version: '3.8'
services:
app:
build:
context: ./
dockerfile: ./Dockerfile
target: dev
ports:
- 3000:3000
volumes:
- ./:/usr/src/app
environment:
NODE_ENV: development
DB_URI: mongodb://root:example@db:27017/devdb?authSource=admin
SALT: 10
ACCESS_TOKEN_SECRET: vetyvety
REFRESH_TOKEN_SECRET: fjeiejwi
depends_on:
db:
condition: service_healthy
links:
- db
db:
image: mongo:latest
volumes:
- devdb:/data/db
ports:
- 27017:27017
environment:
MONGO_INITDB_ROOT_USERNAME: root
MONGO_INITDB_ROOT_PASSWORD: example
MONGO_INITDB_DATABASE: devdb
healthcheck:
test: ["CMD-SHELL", "echo 'db.runCommand({ping: 1})' | mongosh --username root --password example --authenticationDatabase admin"]
interval: 15s
timeout: 10s
retries: 10
volumes:
devdb:
driver: local