# Front nginx for spaceshell.ru — reverse-proxies the landing container and # serves macOS .dmg downloads from the host-mounted ./download volume. server { listen 80; listen [::]:80; server_name spaceshell.ru www.spaceshell.ru; # Resolve `landing` at request time via Docker's embedded DNS, so nginx # starts even if the landing container is momentarily down (a static # `upstream { server landing:80; }` makes nginx fail to boot when the name # can't be resolved, restart-looping the proxy → flapping page). resolver 127.0.0.11 valid=10s ipv6=off; # Stable download URL: /download/spacesh.dmg → ./download/spacesh.dmg on host. location /download/ { alias /srv/download/; autoindex off; default_type application/octet-stream; add_header Content-Disposition "attachment"; types { application/x-apple-diskimage dmg; } } location / { # Variable in proxy_pass forces runtime resolution (with the resolver above). set $landing http://landing:80; proxy_pass $landing; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; } }