Nginx Container¶
The Nginx container functions as the web server and reverse proxy, routing HTTP traffic to the appropriate application containers (such as PHP or Node.js).
Dockerfile: devops/{env}/nginx/Dockerfile
Local domain¶
The default local domain is https://barberklingen.se-local. Add an entry to your system's hosts file pointing it to 127.0.0.1:
SSL certificates¶
Certificates are stored in devops/dev/nginx/certs/. If you need to generate a new certificate, use mkcert (available via Homebrew):
Access logs¶
Access logs are saved inside the Docker container by default. To tail them:
Service configuration¶
| Property | Value |
|---|---|
| Dockerfile | devops/prod/nginx/Dockerfile |
| Ports (prod) | 80:80 |
| Ports (dev) | 80:80, 443:443 |
| Depends on | php |
| Network | barberklingen-<site>-network |
| Mounts | App code → /var/www/htmlNginx config → /etc/nginx/conf.d/default.confCerts → /etc/nginx/certs (dev only) |