-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.prod.yml
More file actions
76 lines (62 loc) · 1.69 KB
/
Copy pathdocker-compose.prod.yml
File metadata and controls
76 lines (62 loc) · 1.69 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
# Production Docker Compose Configuration
# For deployment in production environments
#
# Usage:
# docker-compose -f docker-compose.prod.yml up -d
#
# All sensitive data must be provided via environment variables or secrets
services:
# pgAdmin-rs Application (Production)
# Note: This assumes PostgreSQL is managed separately
app:
image: pgadmin-rs:latest
container_name: pgadmin-rs-prod
environment:
# Server configuration
SERVER_ADDRESS: 0.0.0.0:3000
# PostgreSQL connection URL (required)
POSTGRES_URL: ${POSTGRES_URL}
# Rate limiting (production: stricter limits)
RATE_LIMIT_REQUESTS_PER_MINUTE: ${RATE_LIMIT_REQUESTS_PER_MINUTE:-100}
# Logging (warn level in production)
RUST_LOG: ${RUST_LOG:-pgadmin_rs=info,axum=warn}
ports:
- "3000:3000"
networks:
- pgadmin_network
restart: always
# Security hardening
# Read-only filesystem except for /tmp
read_only: true
tmpfs:
- /tmp
# Drop all capabilities, only add what's needed
security_opt:
- no-new-privileges:true
cap_drop:
- ALL
# Resource limits (optional, adjust based on your needs)
# deploy:
# resources:
# limits:
# cpus: '2'
# memory: 1G
# reservations:
# cpus: '1'
# memory: 512M
# Health check
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost:3000/health || exit 1"]
interval: 30s
timeout: 3s
retries: 3
start_period: 10s
# Logging configuration
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
networks:
pgadmin_network:
driver: bridge