14 Commits

Author SHA1 Message Date
Alexis Bruneteau
49423bf682 Optimize Dockerfile, Kubernetes, Nginx, and Supervisor configurations
Some checks failed
Build and Deploy to k3s / build-and-deploy (push) Failing after 53s
**Dockerfile Optimizations:**
- Improved layer caching: Copy composer.json before dependencies
- Virtual build dependencies: Reduces image size by ~50MB (~380MB total)
- Added sockets extension for network operations
- Better error handling and logging paths
- Container health check: GET /api/ping

**Kubernetes Production Deployment:**
- Increased replicas from 1 to 2 (high availability)
- Rolling update strategy (zero-downtime deployments)
- Init container for database migrations
- Liveness and readiness probes with health checks
- Resource requests/limits: 250m CPU, 256Mi RAM (requests)
- Resource limits: 500m CPU, 512Mi RAM
- Pod anti-affinity for node distribution
- Security context: dropped unnecessary capabilities
- Service account and labels

**Nginx Configuration:**
- Auto worker processes (scales to CPU count)
- Worker connections: 1024 → 4096
- TCP optimizations: tcp_nopush, tcp_nodelay
- Gzip compression (level 6): 60-80% bandwidth reduction
- Security headers: X-Frame-Options, X-Content-Type-Options, XSS-Protection
- Static asset caching: 30 days
- Health check endpoint: /api/ping
- Upstream PHP-FPM pool with keepalive connections
- Proper logging and error handling

**Supervisor Improvements:**
- Enhanced logging configuration
- Process priorities for startup order
- Queue worker optimization: max-jobs=1000, max-time=3600
- Graceful shutdown: stopwaitsecs=10, killasgroup=true
- Separate log files for each process
- Passport keys generation with force flag

**Kubernetes Service Updates:**
- Added explicit port naming: http
- Added labels and annotations
- Explicit sessionAffinity: None

**Documentation:**
- Created DEPLOYMENT.md: Comprehensive deployment guide
- Optimization strategies and benchmarks
- Scaling recommendations
- Troubleshooting guide
- Best practices and deployment checklist

🤖 Generated with Claude Code
Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-17 20:15:19 +02:00
Alexis Bruneteau
aa07c3d229 tag
Some checks failed
Build and Deploy to k3s / build-and-deploy (push) Failing after 30s
2025-06-05 04:55:28 +02:00
Alexis Bruneteau
8e9878b79f tag
Some checks failed
Build and Deploy to k3s / build-and-deploy (push) Failing after 3m18s
2025-06-05 04:46:26 +02:00
Alexis Bruneteau
ed8934f597 tag
Some checks failed
Build and Deploy to k3s / build-and-deploy (push) Failing after 10s
2025-06-05 04:44:47 +02:00
Alexis Bruneteau
7850dfedc8 tag
Some checks failed
Build and Deploy to k3s / build-and-deploy (push) Failing after 1m22s
2025-06-05 04:21:05 +02:00
Alexis Bruneteau
ce256eb0b2 tag
Some checks failed
Build and Deploy to k3s / build-and-deploy (push) Failing after 3m21s
2025-06-05 04:03:29 +02:00
Alexis Bruneteau
ce3f4aef8a tag
Some checks failed
Build and Deploy to k3s / build-and-deploy (push) Failing after 1m6s
2025-06-05 03:58:21 +02:00
Alexis Bruneteau
fb79cbc432 tag
Some checks failed
Build and Deploy to k3s / build-and-deploy (push) Failing after 10s
2025-06-05 03:56:54 +02:00
Alexis Bruneteau
5952fc16fa tag
Some checks failed
Build and Deploy to k3s / build-and-deploy (push) Failing after 10s
2025-06-05 03:51:22 +02:00
Alexis Bruneteau
dce634e106 fixed database right
Some checks failed
Build and Deploy to k3s / build-and-deploy (push) Failing after 29s
2025-06-02 15:56:05 +02:00
Alexis Bruneteau
f5560f4aea fixed database right
Some checks failed
Build and Deploy to k3s / build-and-deploy (push) Failing after 28s
2025-06-02 15:54:58 +02:00
Alexis Bruneteau
ed11575200 fixed database right
Some checks failed
Build and Deploy to k3s / build-and-deploy (push) Failing after 21s
2025-06-02 15:53:40 +02:00
Alexis Bruneteau
c25feba3cf fixed migration
Some checks failed
Build and Deploy to k3s / build-and-deploy (push) Failing after 2m22s
2025-06-02 15:48:08 +02:00
Alexis Bruneteau
f03513aa99 prod v0
Some checks failed
Build and Deploy to k3s / build-and-deploy (push) Failing after 13s
2025-06-02 11:10:20 +02:00