added Dockerfile and compose file

main
Johannes Bülow 2024-12-19 17:34:32 +01:00
parent 3f32810cfc
commit dfb6e2b702
Signed by: jmb
GPG Key ID: B56971CF7B8F83A6
3 changed files with 70 additions and 0 deletions

24
.woodpecker.yml Normal file
View File

@ -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

13
Dockerfile Normal file
View File

@ -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"]

33
docker-compose.yml Normal file
View File

@ -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