Compare commits
2 Commits
bb10ae775e
...
65fc1b91a4
| Author | SHA1 | Date | |
|---|---|---|---|
| 65fc1b91a4 | |||
| 2e89c4bb39 |
@ -5,7 +5,7 @@ APP_NAME := adminer
|
|||||||
|
|
||||||
IMAGE_NAME := adminer
|
IMAGE_NAME := adminer
|
||||||
|
|
||||||
VERSION := 4.7.5
|
VERSION := 4.7.7
|
||||||
|
|
||||||
all: build release
|
all: build release
|
||||||
.PHONY: all
|
.PHONY: all
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
SCRIPT_PATH=$( cd "$(dirname "$0")" ; pwd -P )
|
SCRIPT_PATH=$( cd "$(dirname "$0")" ; pwd -P )
|
||||||
|
|
||||||
IMAGE_NAME="yoursystemcz/adminer"
|
IMAGE_NAME="yoursystemcz/adminer"
|
||||||
IMAGE_VERSION="4.7.3"
|
IMAGE_VERSION="4.7.7"
|
||||||
|
|
||||||
SERVICE_NAME=adminer
|
SERVICE_NAME=adminer
|
||||||
|
|
||||||
|
|||||||
@ -1,18 +1,18 @@
|
|||||||
DOCKER_REGISTRY = dr.ys-dev.cz
|
DOCKER_REGISTRY = dr.ys-dev.cz
|
||||||
DOCKER_PUBLIC_REGISTRY = yoursystemcz
|
DOCKER_PUBLIC_REGISTRY = yoursystemcz
|
||||||
APP_NAME = dev-proxy
|
APP_NAME = dev-proxy
|
||||||
|
APP_VERSION = 2.0
|
||||||
|
|
||||||
|
|
||||||
all: build release
|
all: build release
|
||||||
|
|
||||||
|
|
||||||
build:
|
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:
|
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
|
release: tag
|
||||||
docker push $(DOCKER_REGISTRY)/$(APP_NAME):latest
|
docker push $(DOCKER_REGISTRY)/$(APP_NAME):$(APP_VERSION)
|
||||||
docker push $(DOCKER_PUBLIC_REGISTRY)/$(APP_NAME):latest
|
docker push $(DOCKER_PUBLIC_REGISTRY)/$(APP_NAME):$(APP_VERSION)
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
SCRIPT_PATH=$( cd "$(dirname "$0")" ; pwd -P )
|
SCRIPT_PATH=$( cd "$(dirname "$0")" ; pwd -P )
|
||||||
|
|
||||||
IMAGE_NAME="yoursystemcz/dev-proxy"
|
IMAGE_NAME="yoursystemcz/dev-proxy"
|
||||||
IMAGE_VERSION="latest"
|
IMAGE_VERSION="2.0"
|
||||||
|
|
||||||
SERVICE_NAME=dev-proxy
|
SERVICE_NAME=dev-proxy
|
||||||
|
|
||||||
|
|||||||
@ -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 FOREGO_VERSION="0.16.1"
|
||||||
ARG DOCKER_GEN_VERSION="0.7.4"
|
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 \
|
RUN curl --silent --show-error --fail --location \
|
||||||
--header "Accept: application/tar+gzip, application/x-gzip, application/octet-stream" -o - \
|
--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 \
|
| tar --no-same-owner -C /usr/bin -xz \
|
||||||
&& chmod 0755 /usr/bin/caddy \
|
&& chmod 0755 /usr/bin/caddy \
|
||||||
&& /usr/bin/caddy -version \
|
&& /usr/bin/caddy version \
|
||||||
&& apk del .build-dependencies
|
&& apk del .build-dependencies
|
||||||
|
|
||||||
EXPOSE 80 443 2015
|
EXPOSE 80 443
|
||||||
VOLUME /etc/caddy
|
VOLUME /etc/caddy
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -1,2 +1,2 @@
|
|||||||
dockergen: docker-gen -notify-output -config /code/docker-gen/config/docker-gen.cfg
|
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
|
||||||
|
|||||||
@ -4,4 +4,3 @@ dest = "/etc/caddy/Caddyfile"
|
|||||||
onlyexposed = false
|
onlyexposed = false
|
||||||
watch = true
|
watch = true
|
||||||
wait = "500ms:2s"
|
wait = "500ms:2s"
|
||||||
notifycmd = "pkill -USR1 caddy"
|
|
||||||
|
|||||||
@ -4,46 +4,55 @@
|
|||||||
|
|
||||||
{{ if not $hosts }}
|
{{ if not $hosts }}
|
||||||
|
|
||||||
127.0.0.1:2015
|
127.0.0.1:80
|
||||||
log stdout
|
log stdout
|
||||||
errors stderr
|
errors stderr
|
||||||
|
|
||||||
{{ else }}
|
{{ else }}
|
||||||
|
{
|
||||||
|
auto_https disable_redirects
|
||||||
|
local_certs
|
||||||
|
}
|
||||||
{{ range $host, $containers := $hosts }}
|
{{ range $host, $containers := $hosts }}
|
||||||
{{ $c := first $containers }}
|
{{ $c := first $containers }}
|
||||||
{{ $tlsOff := trim (index $c.Env "VIRTUAL_DISABLE_TLS") }}
|
{{ $tlsOff := trim (index $c.Env "VIRTUAL_DISABLE_TLS") }}
|
||||||
{{ $port := coalesce $c.Env.VIRTUAL_PORT "80" }}
|
{{ $port := coalesce $c.Env.VIRTUAL_PORT "80" }}
|
||||||
|
|
||||||
http://{{ $host }}, https://{{ $host }} {
|
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 }}
|
{{ range $i, $container := $containers }}
|
||||||
{{ $addrLen := len $container.Addresses }}
|
{{ $addrLen := len $container.Addresses }}
|
||||||
{{ range $knownNetwork := $CurrentContainer.Networks }}
|
{{ range $knownNetwork := $CurrentContainer.Networks }}
|
||||||
{{ range $containerNetwork := $container.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"))) }}
|
{{ 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
|
## Can be connected with "{{ $containerNetwork.Name }}" network
|
||||||
upstream {{ $containerNetwork.IP }}:{{ $port }}
|
to {{ $containerNetwork.IP }}:{{ $port }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
}
|
}
|
||||||
|
|
||||||
gzip {
|
|
||||||
not /__webpack_hmr
|
@hmr {
|
||||||
|
not {
|
||||||
|
path /__webpack_hmr
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
encode @hmr gzip
|
||||||
|
|
||||||
|
log {
|
||||||
|
output stdout
|
||||||
}
|
}
|
||||||
log stdout
|
|
||||||
errors stderr
|
|
||||||
}
|
}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user