added Dockerfile and compose file
parent
3f32810cfc
commit
dfb6e2b702
|
@ -0,0 +1,24 @@
|
|||
when:
|
||||
- branch: main
|
||||
event: push
|
||||
|
||||
|
||||
variables:
|
||||
- &file Dockerfile
|
||||
- &repo git.jmbit.de/${CI_REPO_OWNER}/${CI_REPO_NAME}
|
||||
|
||||
steps:
|
||||
build:
|
||||
image: woodpeckerci/plugin-docker-buildx
|
||||
settings:
|
||||
dockerfile: *file
|
||||
platforms: linux/arm64/v8,linux/amd64
|
||||
repo: *repo
|
||||
registry: git.jmbit.de
|
||||
tags: latest
|
||||
username: ${CI_REPO_OWNER}
|
||||
password:
|
||||
from_secret: forgejo_token
|
||||
when:
|
||||
event: push
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
ARG CADDY_VERSION=2.8
|
||||
FROM caddy:${CADDY_VERSION}-builder-alpine AS builder
|
||||
|
||||
RUN xcaddy build \
|
||||
--with github.com/lucaslorentz/caddy-docker-proxy/v2 \
|
||||
--with github.com/mholt/caddy-l4
|
||||
|
||||
FROM caddy:${CADDY_VERSION}-alpine
|
||||
|
||||
COPY --from=builder /usr/bin/caddy /usr/bin/caddy
|
||||
|
||||
CMD ["caddy", "docker-proxy"]
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
services:
|
||||
caddy:
|
||||
image: git.jmbit.de/jmb/caddy-proxy
|
||||
container_name: "caddy"
|
||||
ports:
|
||||
- "80:80"
|
||||
- "443:443"
|
||||
volumes:
|
||||
- "/srv/caddy/data:/data"
|
||||
- "/srv/caddy/Caddyfile:/Caddyfile"
|
||||
- "/var/run/docker.sock:/var/run/docker.sock:ro"
|
||||
networks:
|
||||
- caddy-network
|
||||
environment:
|
||||
- "CADDY_DOCKER_CADDYFILE_PATH=/Caddyfile"
|
||||
www:
|
||||
container_name: www-jmbit-de
|
||||
image: git.jmbit.de/jmb/www-jmbit-de
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- caddy-network
|
||||
expose:
|
||||
- 80
|
||||
labels:
|
||||
caddy: www.jmbit.de
|
||||
caddy.reverse_proxy: "{{upstreams 80}}"
|
||||
caddy.0_header: server Potato
|
||||
networks:
|
||||
caddy-network:
|
||||
driver: bridge
|
||||
name: caddy-network
|
||||
external: true
|
||||
|
Loading…
Reference in New Issue