diff --git a/.woodpecker.yml b/.woodpecker.yml new file mode 100644 index 0000000..c841f0c --- /dev/null +++ b/.woodpecker.yml @@ -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 + diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..e8ab876 --- /dev/null +++ b/Dockerfile @@ -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"] + diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..131aaa2 --- /dev/null +++ b/docker-compose.yml @@ -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 +