-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
63 lines (59 loc) · 1.58 KB
/
docker-compose.yml
File metadata and controls
63 lines (59 loc) · 1.58 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
# Fokus App - Docker Compose
# Local development and production deployment
services:
# Backend API
backend:
build:
context: ./backend
dockerfile: Dockerfile
container_name: fokus-backend
restart: unless-stopped
environment:
DATABASE_URL: file:./data/fokus.db
JWT_SECRET: ${JWT_SECRET:-}
JWT_EXPIRES_IN: ${JWT_EXPIRES_IN:-7d}
ALLOW_REGISTRATION: ${ALLOW_REGISTRATION:-true}
PORT: 3001
NODE_ENV: ${NODE_ENV:-production}
CORS_ORIGIN: ${CORS_ORIGIN:-http://localhost:3000}
GOOGLE_CLIENT_ID: ${GOOGLE_CLIENT_ID:-}
ports:
- "${BACKEND_HOST_PORT:-3001}:3001"
volumes:
- fokus_data:/app/data
healthcheck:
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:3001/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
networks:
- fokus-network
# Frontend App
frontend:
build:
context: .
dockerfile: Dockerfile
args:
VITE_API_URL: ${VITE_API_URL:-http://localhost:3001/api}
VITE_GOOGLE_CLIENT_ID: ${VITE_GOOGLE_CLIENT_ID:-}
container_name: fokus-frontend
restart: unless-stopped
ports:
- "${FRONTEND_HOST_PORT:-3000}:80"
depends_on:
backend:
condition: service_healthy
healthcheck:
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://127.0.0.1/health"]
interval: 30s
timeout: 10s
retries: 3
networks:
- fokus-network
volumes:
fokus_data:
driver: local
networks:
fokus-network:
driver: bridge