-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
93 lines (88 loc) · 2.71 KB
/
docker-compose.yml
File metadata and controls
93 lines (88 loc) · 2.71 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
services:
postgres:
image: postgres:18-alpine
container_name: leaflock-postgres
environment:
POSTGRES_USER: ${POSTGRES_USER:-postgres}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-postgres}
POSTGRES_DB: ${POSTGRES_DB:-leaflock}
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-postgres}"]
interval: 5s
timeout: 5s
retries: 6
redis:
image: redis:8-alpine
container_name: leaflock-redis
command: ["redis-server", "--save", "60", "1", "--loglevel", "warning"]
ports:
- "6379:6379"
volumes:
- redis_data:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 3s
retries: 20
backend:
build:
context: ./backend
dockerfile: Dockerfile
container_name: leaflock-backend
environment:
APP_ENV: ${APP_ENV:-development}
PORT: 8080
DATABASE_URL: postgres://${POSTGRES_USER:-postgres}:${POSTGRES_PASSWORD:-postgres}@postgres:5432/${POSTGRES_DB:-leaflock}?sslmode=disable
REDIS_URL: ${REDIS_URL:-redis://redis:6379}
CORS_ORIGINS: ${CORS_ORIGINS:-http://localhost:3000}
ENABLE_METRICS: ${ENABLE_METRICS:-true}
CLERK_PUBLISHABLE_KEY: ${CLERK_PUBLISHABLE_KEY:-}
CLERK_SECRET_KEY: ${CLERK_SECRET_KEY:-}
CLERK_JWT_TEMPLATE: ${CLERK_JWT_TEMPLATE:-}
CLERK_FALLBACK_USER_ID: ${CLERK_FALLBACK_USER_ID:-}
ports:
- "8080:8080"
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
args:
VITE_API_URL: ${VITE_API_URL:-/api/v1}
VITE_CLERK_PUBLISHABLE_KEY: ${VITE_CLERK_PUBLISHABLE_KEY:-}
VITE_CLERK_JWT_TEMPLATE: ${VITE_CLERK_JWT_TEMPLATE:-}
container_name: leaflock-frontend
environment:
BACKEND_INTERNAL_URL: ${BACKEND_INTERNAL_URL:-http://backend:8080}
PORT: ${FRONTEND_PORT:-80}
VITE_CLERK_PUBLISHABLE_KEY: ${VITE_CLERK_PUBLISHABLE_KEY:-}
VITE_CLERK_JWT_TEMPLATE: ${VITE_CLERK_JWT_TEMPLATE:-}
VITE_API_URL: ${VITE_API_URL:-http://localhost:8080/api/v1}
ports:
- "3000:${FRONTEND_PORT:-80}"
depends_on:
backend:
condition: service_started
volumes:
postgres_data:
redis_data:
# Optional: Enable IPv6 dual-stack networking
# Uncomment to enable IPv6 support in Docker containers
# networks:
# default:
# enable_ipv6: true
# driver: bridge
# ipam:
# config:
# - subnet: 172.20.0.0/16
# gateway: 172.20.0.1
# - subnet: fd00:dead:beef::/48
# gateway: fd00:dead:beef::1