Compare commits

...

2 Commits

Author SHA1 Message Date
65fc1b91a4 Update adminer 2020-10-06 11:30:23 +02:00
2e89c4bb39 Update dev proxy 2020-10-06 11:30:15 +02:00
8 changed files with 39 additions and 31 deletions

View File

@ -5,7 +5,7 @@ APP_NAME := adminer
IMAGE_NAME := adminer
VERSION := 4.7.5
VERSION := 4.7.7
all: build release
.PHONY: all

View File

@ -3,7 +3,7 @@
SCRIPT_PATH=$( cd "$(dirname "$0")" ; pwd -P )
IMAGE_NAME="yoursystemcz/adminer"
IMAGE_VERSION="4.7.3"
IMAGE_VERSION="4.7.7"
SERVICE_NAME=adminer

View File

@ -1,18 +1,18 @@
DOCKER_REGISTRY = dr.ys-dev.cz
DOCKER_PUBLIC_REGISTRY = yoursystemcz
APP_NAME = dev-proxy
APP_VERSION = 2.0
all: build release
build:
docker build -t $(DOCKER_REGISTRY)/$(APP_NAME):latest --build-arg "IMAGE_NAME=nimmis/alpine" --build-arg "IMAGE_VERSION=3.8" ./src
docker build -t $(DOCKER_REGISTRY)/$(APP_NAME):$(APP_VERSION) ./src
tag:
docker tag $(DOCKER_REGISTRY)/$(APP_NAME):latest $(DOCKER_PUBLIC_REGISTRY)/$(APP_NAME):latest
docker tag $(DOCKER_REGISTRY)/$(APP_NAME):$(APP_VERSION) $(DOCKER_PUBLIC_REGISTRY)/$(APP_NAME):$(APP_VERSION)
release: tag
docker push $(DOCKER_REGISTRY)/$(APP_NAME):latest
docker push $(DOCKER_PUBLIC_REGISTRY)/$(APP_NAME):latest
docker push $(DOCKER_REGISTRY)/$(APP_NAME):$(APP_VERSION)
docker push $(DOCKER_PUBLIC_REGISTRY)/$(APP_NAME):$(APP_VERSION)

View File

@ -3,7 +3,7 @@
SCRIPT_PATH=$( cd "$(dirname "$0")" ; pwd -P )
IMAGE_NAME="yoursystemcz/dev-proxy"
IMAGE_VERSION="latest"
IMAGE_VERSION="2.0"
SERVICE_NAME=dev-proxy

View File

@ -1,6 +1,6 @@
FROM alpine:3.8
FROM alpine:3.12
ARG CADDY_VERSION="0.11.1"
ARG CADDY_VERSION="2.2.0"
ARG FOREGO_VERSION="0.16.1"
ARG DOCKER_GEN_VERSION="0.7.4"
@ -32,13 +32,13 @@ RUN wget --quiet "https://github.com/jwilder/docker-gen/releases/download/$DOCKE
RUN curl --silent --show-error --fail --location \
--header "Accept: application/tar+gzip, application/x-gzip, application/octet-stream" -o - \
"https://github.com/mholt/caddy/releases/download/v${CADDY_VERSION}/caddy_v${CADDY_VERSION}_linux_amd64.tar.gz" \
"https://github.com/mholt/caddy/releases/download/v${CADDY_VERSION}/caddy_${CADDY_VERSION}_linux_amd64.tar.gz" \
| tar --no-same-owner -C /usr/bin -xz \
&& chmod 0755 /usr/bin/caddy \
&& /usr/bin/caddy -version \
&& /usr/bin/caddy version \
&& apk del .build-dependencies
EXPOSE 80 443 2015
EXPOSE 80 443
VOLUME /etc/caddy

View File

@ -1,2 +1,2 @@
dockergen: docker-gen -notify-output -config /code/docker-gen/config/docker-gen.cfg
caddy: caddy --conf /etc/caddy/Caddyfile --log stdout
caddy: caddy run --config /etc/caddy/Caddyfile --watch

View File

@ -4,4 +4,3 @@ dest = "/etc/caddy/Caddyfile"
onlyexposed = false
watch = true
wait = "500ms:2s"
notifycmd = "pkill -USR1 caddy"

View File

@ -4,46 +4,55 @@
{{ if not $hosts }}
127.0.0.1:2015
127.0.0.1:80
log stdout
errors stderr
{{ else }}
{
auto_https disable_redirects
local_certs
}
{{ range $host, $containers := $hosts }}
{{ $c := first $containers }}
{{ $tlsOff := trim (index $c.Env "VIRTUAL_DISABLE_TLS") }}
{{ $port := coalesce $c.Env.VIRTUAL_PORT "80" }}
http://{{ $host }}, https://{{ $host }} {
tls self_signed
tls internal
reverse_proxy * {
header_up X-Real-IP {http.request.remote}
header_up X-Forwarded-Port {http.request.port}
header_up X-Forwarded-Proto {http.request.scheme}
flush_interval -1
proxy / {
policy round_robin
transparent
websocket
header_upstream Host {host}
header_upstream X-Real-IP {remote}
header_upstream X-Forwarded-For {remote}
header_upstream X-Forwarded-Proto {scheme}
{{ range $i, $container := $containers }}
{{ $addrLen := len $container.Addresses }}
{{ range $knownNetwork := $CurrentContainer.Networks }}
{{ range $containerNetwork := $container.Networks }}
{{ if (and (and (ne $containerNetwork.Name "ingress") (ne $containerNetwork.Name "bridge")) (or (eq $knownNetwork.Name $containerNetwork.Name) (eq $knownNetwork.Name "host"))) }}
## Can be connected with "{{ $containerNetwork.Name }}" network
upstream {{ $containerNetwork.IP }}:{{ $port }}
to {{ $containerNetwork.IP }}:{{ $port }}
{{ end }}
{{ end }}
{{ end }}
{{ end }}
}
gzip {
not /__webpack_hmr
@hmr {
not {
path /__webpack_hmr
}
}
encode @hmr gzip
log {
output stdout
}
log stdout
errors stderr
}
{{ end }}