/home/suroeste/public_html/payments.transportessuroeste.com
Edit: /home/suroeste/public_html/payments.transportessuroeste.com/docker-compose.prod.yml (3089B)
# ============================================================================
# TRANSPORTES SUROESTE - Docker Compose (Production)
# ============================================================================
# Usage: docker compose -f docker-compose.yml -f docker-compose.prod.yml up -d
# ============================================================================
services:
# ==========================================================================
# PHP-FPM - Production hardening
# ==========================================================================
php:
restart: always
read_only: true
tmpfs:
- /tmp:size=64M,noexec,nosuid,nodev
security_opt:
- no-new-privileges:true
deploy:
resources:
limits:
cpus: '2.0'
memory: 1G
reservations:
cpus: '0.5'
memory: 256M
restart_policy:
condition: on-failure
delay: 5s
max_attempts: 5
# ==========================================================================
# Nginx - Production hardening
# ==========================================================================
nginx:
restart: always
ports:
- "80:80"
read_only: true
tmpfs:
- /var/cache/nginx:size=32M
- /var/run:size=1M
- /tmp:size=16M
security_opt:
- no-new-privileges:true
deploy:
resources:
limits:
cpus: '1.0'
memory: 256M
reservations:
cpus: '0.25'
memory: 64M
restart_policy:
condition: on-failure
delay: 5s
max_attempts: 5
# ==========================================================================
# MySQL - Production hardening
# ==========================================================================
mysql:
restart: always
# Do NOT expose ports in production
ports: []
security_opt:
- no-new-privileges:true
deploy:
resources:
limits:
cpus: '2.0'
memory: 2G
reservations:
cpus: '0.5'
memory: 512M
restart_policy:
condition: on-failure
delay: 10s
max_attempts: 3
# ==========================================================================
# Redis - Production
# ==========================================================================
redis:
image: redis:7-alpine
container_name: ts-redis
restart: always
command: >
redis-server
--maxmemory 128mb
--maxmemory-policy allkeys-lru
--save ""
--appendonly no
--protected-mode yes
networks:
- backend
security_opt:
- no-new-privileges:true
deploy:
resources:
limits:
cpus: '0.5'
memory: 192M
reservations:
cpus: '0.1'
memory: 64M
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 15s
timeout: 3s
retries: 3