forked from jhd3197/ServerKit
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.dev.yml
More file actions
69 lines (65 loc) · 1.8 KB
/
docker-compose.dev.yml
File metadata and controls
69 lines (65 loc) · 1.8 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
# ==============================================
# ServerKit Development Docker Compose
# ==============================================
# FOR LOCAL TESTING ONLY - System management features
# (PHP install, firewall, etc.) won't work in Docker.
#
# Usage:
# docker compose -f docker-compose.dev.yml up --build
#
# Access:
# Frontend: http://localhost:3000
# Backend: http://localhost:5000
# ==============================================
services:
backend:
build:
context: ./backend
dockerfile: Dockerfile
container_name: serverkit-backend-dev
environment:
- FLASK_ENV=development
- SECRET_KEY=dev-secret-key-not-for-production
- JWT_SECRET_KEY=dev-jwt-key-not-for-production
- DATABASE_URL=sqlite:////app/instance/serverkit.db
- CORS_ORIGINS=http://localhost,http://localhost:3000,http://localhost:5173
ports:
- "5000:5000"
volumes:
- dev-data:/app/instance
- dev-config:/etc/serverkit
networks:
- serverkit-dev
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:5000/api/v1/system/health"]
interval: 10s
timeout: 5s
retries: 3
frontend-dev:
image: node:20-alpine
container_name: serverkit-frontend-dev
working_dir: /app
command: sh -c "npm install && npm run dev -- --host 0.0.0.0 --port 3000"
environment:
- VITE_API_URL=http://localhost:5000
ports:
- "3000:3000"
volumes:
- ./frontend:/app
- frontend-modules:/app/node_modules
depends_on:
backend:
condition: service_healthy
networks:
- serverkit-dev
networks:
serverkit-dev:
driver: bridge
name: serverkit-dev
volumes:
dev-data:
name: serverkit-dev-data
dev-config:
name: serverkit-dev-config
frontend-modules:
name: serverkit-frontend-modules