Repository navigation
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
100 lines (95 loc) · 2.55 KB
/
Copy pathdocker-compose.yml
File metadata and controls
100 lines (95 loc) · 2.55 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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
services:
postgres:
image: postgres:16-alpine
container_name: flowforge-postgres
environment:
POSTGRES_USER: flowforge
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-flowforge}
POSTGRES_DB: flowforge
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U flowforge -d flowforge"]
interval: 5s
timeout: 5s
retries: 10
redis:
image: redis:7-alpine
container_name: flowforge-redis
command: ["redis-server", "--appendonly", "yes"]
ports:
- "6379:6379"
volumes:
- redis_data:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 5s
retries: 10
api:
build:
context: .
dockerfile: Dockerfile
target: api
container_name: flowforge-api
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
environment:
NODE_ENV: production
PORT: 3000
HOST: 0.0.0.0
DATABASE_URL: postgres://flowforge:${POSTGRES_PASSWORD:-flowforge}@postgres:5432/flowforge
REDIS_URL: redis://redis:6379
JWT_ACCESS_SECRET: ${JWT_ACCESS_SECRET:-dev-access-secret-change-me}
JWT_REFRESH_SECRET: ${JWT_REFRESH_SECRET:-dev-refresh-secret-change-me}
JWT_ACCESS_TTL: 900
JWT_REFRESH_TTL: 604800
CORS_ORIGIN: http://localhost:5173
WEBHOOK_BASE_URL: http://localhost:3000
PUBLIC_WEB_URL: http://localhost:5173
ports:
- "3000:3000"
healthcheck:
test: ["CMD", "node", "-e", "fetch('http://localhost:3000/api/health').then(r=>process.exit(r.ok?0:1)).catch(()=>process.exit(1))"]
interval: 10s
timeout: 5s
retries: 10
worker:
build:
context: .
dockerfile: Dockerfile
target: worker
container_name: flowforge-worker
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
environment:
NODE_ENV: production
DATABASE_URL: postgres://flowforge:${POSTGRES_PASSWORD:-flowforge}@postgres:5432/flowforge
REDIS_URL: redis://redis:6379
WORKER_CONCURRENCY: 8
deploy:
replicas: 1
web:
build:
context: .
dockerfile: Dockerfile
target: web
args:
VITE_API_URL: ${VITE_API_URL:-http://localhost:3000}
VITE_DEMO_CREDENTIALS: ${VITE_DEMO_CREDENTIALS:-true}
container_name: flowforge-web
depends_on:
- api
ports:
- "5173:5173"
volumes:
postgres_data:
redis_data: