-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
64 lines (61 loc) · 1.55 KB
/
Copy pathdocker-compose.yml
File metadata and controls
64 lines (61 loc) · 1.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
# Copy .env.docker.example → .env and set secrets before first up.
services:
postgres:
image: postgres:16-alpine
env_file:
- .env
environment:
POSTGRES_USER: ${POSTGRES_USER:-bluemeteor}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:?Set POSTGRES_PASSWORD in .env}
POSTGRES_DB: ${POSTGRES_DB:-bluemeteor_ai_force}
volumes:
- pgdata:/var/lib/postgresql/data
healthcheck:
test: ['CMD-SHELL', 'pg_isready -U $$POSTGRES_USER -d $$POSTGRES_DB']
interval: 5s
timeout: 5s
retries: 10
backend:
build:
context: ./server
dockerfile: Dockerfile
env_file:
- .env
environment:
NODE_ENV: production
DATABASE_PROVIDER: postgresql
STORAGE_ROOT: /data/storage
CORS_ORIGIN: ${CORS_ORIGIN:-http://localhost:8080}
AGENT_ALLOW_PROVIDER_FALLBACK: 'false'
ALLOW_PROVIDER_FALLBACK: 'false'
volumes:
- storage_data:/data/storage
depends_on:
postgres:
condition: service_healthy
expose:
- '3000'
healthcheck:
test:
[
'CMD',
'node',
'-e',
"require('http').get('http://127.0.0.1:3000/health',r=>process.exit(r.statusCode===200?0:1)).on('error',()=>process.exit(1))",
]
interval: 15s
timeout: 5s
retries: 5
start_period: 90s
frontend:
build:
context: .
dockerfile: Dockerfile.frontend
ports:
- '${FRONTEND_PORT:-8080}:80'
depends_on:
backend:
condition: service_healthy
volumes:
pgdata:
storage_data: