-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
79 lines (74 loc) · 2.65 KB
/
Copy pathdocker-compose.yml
File metadata and controls
79 lines (74 loc) · 2.65 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
# Docker Compose — CloudBlocks local development stack
services:
# ─── PostgreSQL Database ──────────────────────────────────────
postgres:
image: postgres:16-alpine
container_name: cloudblocks-postgres
ports:
- '5432:5432'
environment:
POSTGRES_DB: cloudblocks
POSTGRES_USER: ${POSTGRES_USER:-cloudblocks}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-cloudblocks-dev}
volumes:
- postgres-data:/var/lib/postgresql/data
healthcheck:
test: ['CMD-SHELL', 'pg_isready -U ${POSTGRES_USER:-cloudblocks}']
interval: 10s
timeout: 5s
retries: 5
# ─── Redis (Cache / Session / Queue) ────────────────────────
redis:
image: redis:7-alpine
container_name: cloudblocks-redis
ports:
- '6379:6379'
volumes:
- redis-data:/data
healthcheck:
test: ['CMD', 'redis-cli', 'ping']
interval: 10s
timeout: 5s
retries: 5
# ─── API Backend ────────────────────────────────────────────
api:
build:
context: .
dockerfile: infra/docker/api.Dockerfile
container_name: cloudblocks-api
ports:
- '8000:8000'
environment:
CLOUDBLOCKS_DATABASE_URL: postgresql+asyncpg://${POSTGRES_USER:-cloudblocks}:${POSTGRES_PASSWORD:-cloudblocks-dev}@postgres:5432/cloudblocks
CLOUDBLOCKS_SESSION_BACKEND: redis
CLOUDBLOCKS_REDIS_URL: redis://redis:6379/0
CLOUDBLOCKS_APP_ENV: development
CLOUDBLOCKS_JWT_SECRET: ${JWT_SECRET:-change-me-in-production}
CLOUDBLOCKS_GITHUB_CLIENT_ID: ${GITHUB_CLIENT_ID:-}
CLOUDBLOCKS_GITHUB_CLIENT_SECRET: ${GITHUB_CLIENT_SECRET:-}
CLOUDBLOCKS_GITHUB_REDIRECT_URI: http://localhost:8000/api/v1/auth/github/callback
CLOUDBLOCKS_CORS_ORIGINS: '["http://localhost:5173","http://localhost:80"]'
CLOUDBLOCKS_FRONTEND_URL: http://localhost:5173
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
healthcheck:
test: ['CMD', 'curl', '-f', 'http://localhost:8000/health']
interval: 30s
timeout: 5s
retries: 3
# ─── Web Frontend ───────────────────────────────────────────
web:
build:
context: .
dockerfile: infra/docker/web.Dockerfile
container_name: cloudblocks-web
ports:
- '80:80'
depends_on:
- api
volumes:
postgres-data:
redis-data: