1
0
Fork 0
mirror of https://github.com/kou029w/_.git synced 2025-01-30 22:08:02 +00:00

create caddy-docker-proxy

This commit is contained in:
Nebel 2023-01-01 03:59:14 +09:00
parent 78312c01b1
commit 33a3683986
3 changed files with 32 additions and 0 deletions

View file

@ -0,0 +1,5 @@
FROM caddy:2.6.2-builder-alpine AS builder
RUN xcaddy build --with github.com/lucaslorentz/caddy-docker-proxy/v2
FROM caddy:2.6.2-alpine
COPY --from=builder /usr/bin/caddy /usr/bin/caddy
CMD ["caddy", "docker-proxy", "--ingress-networks=caddy"]

View file

@ -0,0 +1,16 @@
services:
caddy-docker-proxy:
image: fogtype/caddy-docker-proxy
build: "."
ports:
- "8080:80"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- caddy_data:/data
- caddy_config:/config
networks:
default:
name: caddy
volumes:
caddy_data:
caddy_config:

View file

@ -0,0 +1,11 @@
services:
nginx:
image: nginx:alpine
networks:
- caddy
labels:
caddy: http://nginx.localhost
caddy.reverse_proxy: "{{ upstreams }}"
networks:
caddy:
external: true