mirror of
https://github.com/batonogov/learn-devops.git
synced 2026-04-28 10:39:55 +00:00
Add uv example (#30)
Co-authored-by: Fedor Batonogov <f.batonogov@yandex.ru>
This commit is contained in:
committed by
GitHub
parent
a998a1bfdb
commit
ea0d72d879
22
docker/blue-green-deployment/nginx.tmpl
Normal file
22
docker/blue-green-deployment/nginx.tmpl
Normal file
@@ -0,0 +1,22 @@
|
||||
{{ 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 }}
|
||||
Reference in New Issue
Block a user