-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompose.yaml
More file actions
54 lines (52 loc) · 1.23 KB
/
compose.yaml
File metadata and controls
54 lines (52 loc) · 1.23 KB
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
46
47
48
49
50
51
52
53
54
services:
nest:
build:
context: .
dockerfile: docker/nest/dockerfile
container_name: ${APP_NAME}_server
command: bun run start:dev
env_file:
- .env
ports:
- "${PORT}:${PORT}"
depends_on:
mongo:
condition: service_healthy
healthcheck:
test: ["CMD-SHELL", "curl -fsS http://localhost:${PORT}/ || exit 1"]
interval: 30s
timeout: 10s
retries: 5
start_period: 15s
develop:
watch:
- action: sync
path: ./src
target: /app/src
- action: sync+restart
path: package.json
target: /app/package.json
- action: sync+restart
path: bun.lock
target: /app/bun.lock
mongo:
build:
context: .
dockerfile: docker/mongo/dockerfile
container_name: ${APP_NAME}_database
ports:
- "${MONGO_PORT}:${MONGO_PORT}"
volumes:
- mongo_data:/data/db
healthcheck:
test: ["CMD-SHELL", "mongosh --quiet --eval 'db.adminCommand({ ping: 1 }).ok' | grep 1"]
interval: 10s
timeout: 5s
retries: 5
start_period: 5s
develop:
watch:
- action: rebuild
path: docker/mongo/dockerfile
volumes:
mongo_data: