Files
learn-devops/docker/blue-green-deployment/nginx.tmpl
github-actions[bot] ea0d72d879 Add uv example (#30)
Co-authored-by: Fedor Batonogov <f.batonogov@yandex.ru>
2024-12-23 17:33:29 +03:00

23 lines
437 B
Cheetah

{{ range $host, $containers := groupBy $ "Env.VIRTUAL_HOST" }}
upstream {{ $host }} {
{{ range $index, $value := $containers }}
{{ with $address := index $value.Addresses 0 }}
server {{ $value.Hostname }}:{{ $address.Port }};
{{ end }}
{{ end }}
}
# конфигурация веб-сервера
server {
listen 8080;
server_tokens off;
location / {
proxy_pass http://{{ $host }};
}
}
{{ end }}