Networking
Purpose: Document network configuration and connectivity requirements.
Contents - Port Configuration - Proxy & Load Balancer - TLS & Security - Container Networking - Sources
Port Configuration¶
Container Ports:
Service | Internal Port | External Port | Protocol | Purpose | Source |
---|---|---|---|---|---|
Nginx | 80 | 8080 | HTTP | Web interface | "Docker Compose Config" — docker-compose.yml — retrieved 2025-01-09 |
PHP-FPM | 9000 | 9000 | FastCGI | Application backend | "Docker Compose Config" — docker-compose.yml — retrieved 2025-01-09 |
MariaDB | 3306 | 3306 | MySQL | Database access | "Docker Compose Config" — docker-compose.yml — retrieved 2025-01-09 |
Redis | 6379 | N/A | Redis | Cache/sessions (internal only) | "Docker Compose Config" — docker-compose.yml — retrieved 2025-01-09 |
Port Binding Security:
- All ports bound to 127.0.0.1
(localhost only)
- No direct external access to database or cache
- Web traffic routed through nginx proxy
- PHP-FPM exposed for direct debugging only
Firewall Configuration:
1 2 3 4 5 6 7 8 |
|
Proxy & Load Balancer¶
Nginx Configuration:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
|
External Load Balancer (Production):
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
|
Trusted Proxies:
1 2 3 4 5 |
|
TLS & Security¶
TLS Termination Options:
Option | Implementation | Pros | Cons | Source |
---|---|---|---|---|
External Load Balancer | Kubernetes Ingress, AWS ALB | Centralized, automatic renewal | Additional infrastructure | "Firefly III Security" — https://docs.firefly-iii.org/how-to/firefly-iii/installation/self-hosted/ — retrieved 2025-01-09 |
Nginx Proxy | Reverse proxy with Let's Encrypt | Simple setup, full control | Manual certificate management | "Firefly III Security" — https://docs.firefly-iii.org/how-to/firefly-iii/installation/self-hosted/ — retrieved 2025-01-09 |
Container TLS | Direct certificate in nginx container | No external dependencies | Complex certificate rotation | "Firefly III Security" — https://docs.firefly-iii.org/how-to/firefly-iii/installation/self-hosted/ — retrieved 2025-01-09 |
Security Headers:
1 2 3 4 5 6 |
|
SSL/TLS Configuration:
1 2 3 4 5 6 7 8 9 |
|
Container Networking¶
Docker Compose Network:
1 2 3 4 |
|
Container Communication: - Containers communicate via service names - Internal DNS resolution provided by Docker - No network isolation between services (shared network) - External network allows integration with other services
Network Security:
1 2 3 4 5 6 |
|
Service Discovery:
- MariaDB: firefly-iii-application.mariadb:3306
- Redis: firefly-iii-application.redis:6379
- Application: firefly-iii-application.application:9000
- Nginx: firefly-iii-application.nginx:80
Performance & Timeouts¶
Connection Timeouts:
1 2 3 4 5 6 7 8 9 |
|
Database Connection Pool:
1 2 3 4 5 |
|
Redis Network Configuration:
1 2 3 4 |
|
Monitoring & Diagnostics¶
Network Health Checks:
1 2 3 4 5 6 7 |
|
Traffic Analysis:
1 2 3 4 5 6 7 8 |
|
Troubleshooting Network Issues:
-
Connection Refused:
- Check service is running:
docker ps
- Verify port binding:
netstat -tlnp | grep :8080
- Check firewall rules:
sudo ufw status
- Check service is running:
-
Slow Response Times:
- Monitor container resources:
docker stats
- Check database performance:
SHOW PROCESSLIST
- Analyze nginx access logs for slow requests
- Monitor container resources:
-
DNS Resolution Issues:
- Verify container network:
docker network inspect webgrip
- Test internal connectivity:
docker exec ... nc -zv service_name port
- Verify container network:
Sources¶
- "Firefly III Installation Guide" — https://docs.firefly-iii.org/how-to/firefly-iii/installation/self-hosted/ — retrieved 2025-01-09
- "Docker Compose Configuration" — docker-compose.yml — retrieved 2025-01-09