-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
72 lines (68 loc) · 1.68 KB
/
docker-compose.yml
File metadata and controls
72 lines (68 loc) · 1.68 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
services:
postgres:
image: postgres:16-alpine
container_name: authbox-postgres
environment:
POSTGRES_DB: auth_box
POSTGRES_USER: auth_box
POSTGRES_PASSWORD: auth_box_dev
volumes:
- postgres_data:/var/lib/postgresql/data
ports:
- "5410:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U auth_box"]
interval: 5s
timeout: 3s
retries: 5
# Redis will be enabled in Phase 4 (session store + rate limiting).
# redis:
# image: redis:7
# container_name: authbox-redis
# ports:
# - "6310:6379"
api:
build:
context: ./services/api
container_name: authbox-api
restart: unless-stopped
environment:
AUTH_BOX_HTTP_ADDR: ":8080"
AUTH_BOX_DB_DSN: "postgres://auth_box:auth_box_dev@postgres:5432/auth_box?sslmode=disable"
AUTH_BOX_ENV: "local"
AUTH_BOX_VERSION: "2.0.0"
AUTH_BOX_ALLOWED_ORIGINS: "http://localhost:3010,http://localhost:3000"
ports:
- "4010:8080"
healthcheck:
test: ["CMD-SHELL", "wget -qO- http://localhost:8080/health || exit 1"]
interval: 10s
timeout: 5s
retries: 3
start_period: 10s
deploy:
resources:
limits:
memory: 256M
depends_on:
postgres:
condition: service_healthy
web:
build:
context: .
dockerfile: apps/web/Dockerfile
container_name: authbox-web
restart: unless-stopped
environment:
NEXT_PUBLIC_API_BASE_URL: "http://localhost:4010"
ports:
- "3010:3000"
deploy:
resources:
limits:
memory: 512M
depends_on:
api:
condition: service_healthy
volumes:
postgres_data: