Skip to content

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:

127.0.0.1  barberklingen.se-local

SSL certificates

Certificates are stored in devops/dev/nginx/certs/. If you need to generate a new certificate, use mkcert (available via Homebrew):

mkcert barberklingen-mysite.test

Access logs

Access logs are saved inside the Docker container by default. To tail them:

docker logs -f barberklingen-<site>-nginx

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/html
Nginx config → /etc/nginx/conf.d/default.conf
Certs → /etc/nginx/certs (dev only)