-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompose.dev.yaml
More file actions
82 lines (77 loc) · 2.33 KB
/
compose.dev.yaml
File metadata and controls
82 lines (77 loc) · 2.33 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
# Docker Compose override for development mode
# Usage: docker compose -f compose.yaml -f compose.dev.yaml up
services:
# MongoDB only in dev mode
mongodb:
image: mongo:latest
container_name: nitflex-mongodb-dev
restart: unless-stopped
environment:
MONGO_INITDB_DATABASE: nitflex
ports:
- '27017:27017'
volumes:
- mongodb_dev_data:/data/db
networks:
- nitflex-network
healthcheck:
test: ['CMD', 'mongosh', '--eval', "db.adminCommand('ping')"]
interval: 10s
timeout: 5s
retries: 5
start_period: 10s
logging:
driver: 'none'
# Go API in dev mode with hot reload
api:
build:
context: ./api
dockerfile: Dockerfile.dev
container_name: nitflex-api-dev
restart: unless-stopped
environment:
- MONGODB_URI=mongodb://mongodb:27017/nitflex
- PORT=8080
- GIN_MODE=debug
ports:
- '8080:8080'
volumes:
- ./api:/app
- ${MOVIES_DIR:-./movies}:/app/movies:rw
- ${SERIES_DIR:-./series}:/app/series:rw
- ${MOVIES_DOCU_DIR:-./movies_docu}:/app/movies_docu:rw
- ${SERIES_DOCU_DIR:-./series_docu}:/app/series_docu:rw
- ${SERIES_KID_DIR:-./series_kid}:/app/series_kid:rw
networks:
- nitflex-network
command: ['air', '-c', '.air.toml']
healthcheck:
test:
['CMD', 'wget', '--quiet', '--tries=1', '--spider', 'http://localhost:8080/health']
interval: 10s
timeout: 5s
retries: 5
start_period: 10s
# React Frontend in dev mode with Vite
frontend:
build:
context: ./app
dockerfile: Dockerfile.dev
container_name: nitflex-frontend-dev
restart: unless-stopped
environment:
- VITE_API=http://localhost:8080
ports:
- '5173:5173'
volumes:
- ./app:/app
- /app/node_modules
networks:
- nitflex-network
command: ['pnpm', 'run', 'dev', '--host']
volumes:
mongodb_dev_data:
driver: local
networks:
nitflex-network:
driver: bridge