Przestała działać, nie startuje kontener nginx-gen::
pi@raspberrypi:~ $ docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
0a27cffdadb4 nginx "/docker-entrypoint.…" About an hour ago Up 27 seconds 0.0.0.0:80->80/tcp, 0.0.0.0:443->443/tcp nginx-web
fc7edc3658f8 lesny8/rpi-docker-letsencrypt-nginx-proxy-companion "/bin/bash /app/entr…" About an hour ago Up 27 seconds nginx-letsencrypt
2b12ce64bd7f lesny8/rpi-docker-gen "/usr/local/bin/dock…" About an hour ago Exited (2) 23 seconds ago nginx-gen
6e6a6db38f4d suplascripts_suplascripts "docker-php-entrypoi…" 2 hours ago Up 10 seconds 80/tcp suplascripts
7177d822eea7 supla/supla-server:arm32v7 "/usr/bin/server-ent…" 3 hours ago Up 18 seconds 0.0.0.0:2015-2016->2015-2016/tcp supla-server
e09ad40cf685 supla/supla-cloud:arm32v7 "docker-php-entrypoi…" 3 hours ago Up 20 seconds 80/tcp supla-cloud
d4b8338452bf hypriot/rpi-mysql:5.5 "/entrypoint.sh mysq…" 4 months ago Up 22 seconds 3306/tcp supla-db
8a5820ea4df8 hypriot/rpi-mysql:5.5 "/entrypoint.sh mysq…" 22 months ago Up 13 seconds 3306/tcp suplascripts-db
w logu jedynie co widać to wpisy:
pi@raspberrypi:~/docker-compose-letsencrypt-nginx-proxy-companion $ docker logs nginx-gen
2021/07/18 11:55:40 Unable to parse template: template: nginx.tmpl:182: unexpected "=" in operand
2021/07/18 12:00:32 Unable to parse template: template: nginx.tmpl:182: unexpected "=" in operand
2021/07/18 12:07:01 Unable to parse template: template: nginx.tmpl:182: unexpected "=" in operand
2021/07/18 12:20:34 Unable to parse template: template: nginx.tmpl:182: unexpected "=" in operand
2021/07/18 12:20:36 Unable to parse template: template: nginx.tmpl:182: unexpected "=" in operand
2021/07/18 12:20:39 Unable to parse template: template: nginx.tmpl:182: unexpected "=" in operand
2021/07/18 12:20:42 Unable to parse template: template: nginx.tmpl:182: unexpected "=" in operand
2021/07/18 12:20:45 Unable to parse template: template: nginx.tmpl:182: unexpected "=" in operand
2021/07/18 12:20:49 Unable to parse template: template: nginx.tmpl:182: unexpected "=" in operand
2021/07/18 12:20:55 Unable to parse template: template: nginx.tmpl:182: unexpected "=" in operand
obrazy :
pi@raspberrypi:~ $ docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
suplascripts_suplascripts latest a80509fc0aab 2 hours ago 454MB
supla/supla-server arm32v7 fb06c6e5ebfc 5 days ago 300MB
supla/supla-cloud arm32v7 28b5aa06ae33 5 days ago 499MB
httpd alpine 65e21d294ea2 9 days ago 41.2MB
nginx latest a9c89e194e6f 11 days ago 103MB
lesny8/rpi-docker-gen latest d5e305bc9a26 20 months ago 15.6MB
lesny8/rpi-docker-letsencrypt-nginx-proxy-companion latest a6da207b5c5d 20 months ago 89.3MB
php 7.1.27-apache-stretch 42b69c7f2cf1 2 years ago 272MB
hypriot/rpi-mysql 5.5 4f3cbdbc3bdb 3 years ago 209MB
Docker version 19.03.15, build 99e3ed8919
docker-compose version 1.24.1, build 4667896
Raspberry Pi - własna instancja
plik /home/pi/docker-compose-letsencrypt-nginx-proxy-companion/nginx.tmpl
od lini 180:
Kod: Zaznacz cały
## Can be connected with "{{ $containerNetwork.Name }}" network
{{ if $address }}
{{/* If we got the containers from swarm and this container's port is published to host, use host IP:PORT */}}
{{ if and $container.Node.ID $address.HostPort }}
{{ $server_found = "true" }}
A to dziwne... w moim nginx.tmpl linia 182 jest pusta... a tak wygląda od linii 180 do 185:
Kod: Zaznacz cały
{{ range $container := $containers }}
{{ $addrLen := len $container.Addresses }}
{{ range $knownNetwork := $CurrentContainer.Networks }}
{{ range $containerNetwork := $container.Networks }}
{{ if (and (ne $containerNetwork.Name "ingress") (or (eq $knownNetwork.Name $containerNetwork.Name) (eq $knownNetwork.Name "host"))) }}
Widzimy się na Supla Offline Party Season 2
to ciekawe bo ogladam kolejno skrypty i tak:Goral64 pisze: ↑ndz lip 18, 2021 9:25 pm A to dziwne... w moim nginx.tmpl linia 182 jest pusta... a tak wygląda od linii 180 do 185:Kod: Zaznacz cały
{{ range $container := $containers }} {{ $addrLen := len $container.Addresses }} {{ range $knownNetwork := $CurrentContainer.Networks }} {{ range $containerNetwork := $container.Networks }} {{ if (and (ne $containerNetwork.Name "ingress") (or (eq $knownNetwork.Name $containerNetwork.Name) (eq $knownNetwork.Name "host"))) }}
w start.sh linia 4 jest:
Kod: Zaznacz cały
# 4. Download the latest version of nginx.tmpl
curl https://raw.githubusercontent.com/jwilder/nginx-proxy/master/nginx.tmpl > nginx.tmpl
Kod: Zaznacz cały
{{ range $container := $containers }}
{{ $debug := (eq (coalesce $container.Env.DEBUG $debug_all "false") "true") }}
{{/* If only 1 port exposed, use that as a default, else 80 */}}
{{ $defaultPort := (when (eq (len $container.Addresses) 1) (first $container.Addresses) (dict "Port" "80")).Port }}
{{ $port := (coalesce $container.Env.VIRTUAL_PORT $defaultPort) }}
{{ $address := where $container.Addresses "Port" $port | first }}
{{ if $debug }}
# Exposed ports: {{ $container.Addresses }}
# Default virtual port: {{ $defaultPort }}
# VIRTUAL_PORT: {{ $container.Env.VIRTUAL_PORT }}
{{ if not $address }}
# /!\ Virtual port not exposed
{{ end }}
{{ end }}
{{ range $knownNetwork := $CurrentContainer.Networks }}
{{ range $containerNetwork := $container.Networks }}
{{ if (and (ne $containerNetwork.Name "ingress") (or (eq $knownNetwork.Name $containerNetwork.Name) (eq $knownNetwork.Name "host"))) }}
## Can be connected with "{{ $containerNetwork.Name }}" network
{{ if $address }}
{{/* If we got the containers from swarm and this container's port is published to host, use host IP:PORT */}}
{{ if and $container.Node.ID $address.HostPort }}
{{ $server_found = "true" }}
# {{ $container.Node.Name }}/{{ $container.Name }}
server {{ $container.Node.Address.IP }}:{{ $address.HostPort }};
{{/* If there is no swarm node or the port is not published on host, use container's IP:PORT */}}
{{ else if $containerNetwork }}
{{ $server_found = "true" }}
# {{ $container.Name }}
server {{ $containerNetwork.IP }}:{{ $address.Port }};
{{ end }}
{{ else if $containerNetwork }}
# {{ $container.Name }}
{{ if $containerNetwork.IP }}
{{ $server_found = "true" }}
server {{ $containerNetwork.IP }}:{{ $port }};
{{ else }}
# /!\ No IP for this network!
{{ end }}
{{ end }}
{{ else }}
# Cannot connect to network '{{ $containerNetwork.Name }}' of this container
{{ end }}
{{ end }}
{{ end }}
{{ end }}
{{/* nginx-proxy/nginx-proxy#1105 */}}
{{ if (eq $server_found "false") }}
# Fallback entry
server 127.0.0.1 down;
{{ end }}
}
kolejna ciekawostka ze skryptu start.sh to krok :
Kod: Zaznacz cały
# 7. Start proxy
# Check if you have multiple network
if [ -z ${SERVICE_NETWORK+X} ]; then
docker-compose up -d
else
docker-compose -f docker-compose-multiple-networks.yml up -d
fi
exit 0
Kod: Zaznacz cały
pi@raspberrypi:~/docker-compose-letsencrypt-nginx-proxy-companion $ docker network ls
NETWORK ID NAME DRIVER SCOPE
f8a6b9453857 bridge bridge local
689f403b6144 host host local
dad1b489bfb2 none null local
b153bf3c2b8a supla_default bridge local
7e82df93b7f2 suplascripts_default bridge local
b2aa78c12ca2 webproxy bridge local
networks:
default:
external:
name: ${NETWORK:-webproxy}
outside:
external:
name: ${SERVICE_NETWORK:-webservices}
Update : zakomentowalem w start.sh krok 4 -> sciaganie pliku i wszystko działa Teraz pytanie dlaczego jest ok:)
Może dlatego, że 4 tygodnie temu nastąpiły w repozytorium istotne zmiany w tym pliku, które nie zostały uwzględnione w pakiecie dostosowanym do SUPL-a?
Widzimy się na Supla Offline Party Season 2