-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.coolify.yml
More file actions
executable file
·52 lines (49 loc) · 1.87 KB
/
docker-compose.coolify.yml
File metadata and controls
executable file
·52 lines (49 loc) · 1.87 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
# Coolify Docker Compose Configuration
# Usage: Set this as the Docker Compose file in Coolify deployment settings
services:
# API service (FrankenPHP - HTTP native)
app:
build:
context: .
dockerfile: ./Dockerfile.frankenphp
container_name: ${RESOURCE_ID}-app
restart: unless-stopped
volumes:
- storage_data:/app/storage
networks:
- coolify
command: sh -c "if [ \"${SKIP_SCHEMA_CHECK:-false}\" != \"true\" ]; then php /app/check_schema.php; fi; exec frankenphp run --config /app/Caddyfile"
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost/health || exit 1"]
interval: 30s
timeout: 10s
retries: 3
start_period: 60s
labels:
# Traefik rate limiting for API endpoints
- traefik.http.middlewares.fc0084skwwoosck00wok08ow-ratelimit.ratelimit.average=100
- traefik.http.middlewares.fc0084skwwoosck00wok08ow-ratelimit.ratelimit.burst=50
- traefik.http.middlewares.fc0084skwwoosck00wok08ow-ratelimit.ratelimit.period=1s
# Apply rate limiting to the router (Coolify auto-creates the router)
- traefik.http.routers.fc0084skwwoosck00wok08ow-app-http.middlewares=fc0084skwwoosck00wok08ow-ratelimit
- traefik.http.routers.fc0084skwwoosck00wok08ow-app-https.middlewares=fc0084skwwoosck00wok08ow-ratelimit
environment:
- SERVICE_FQDN_APP_80
- TZ=Europe/Berlin
# Database configuration
- DB_HOST=${DB_HOST}
- DB_NAME=${DB_NAME}
- DB_USER=${DB_USER}
- DB_PASS=${DB_PASS}
- DB_PORT=${DB_PORT:-5432}
- API_MAX_RESULTS=${API_MAX_RESULTS}
# API logging configuration
- API_LOGGING_ACTIVE=${API_LOGGING_ACTIVE:-true}
# Rate limiting configuration
- RATE_LIMIT_AVERAGE=${RATE_LIMIT_AVERAGE:-100}
- RATE_LIMIT_BURST=${RATE_LIMIT_BURST:-50}
volumes:
storage_data:
networks:
coolify:
external: true