diff --git a/.woodpecker.yml b/.woodpecker.yml new file mode 100644 index 0000000..6c92bcd --- /dev/null +++ b/.woodpecker.yml @@ -0,0 +1,18 @@ +pipeline: + build: + image: docker:latest + volumes: + - /var/run/docker.sock:/var/run/docker.sock + commands: + - docker build -t codebreaker/caddy-keydb:latest . + + deploy: + image: docker:latest + volumes: + - /var/run/docker.sock:/var/run/docker.sock + commands: + - docker pull codebreaker/caddy-keydb:latest + - docker stop caddy-extension || true + - docker rm caddy-extension || true + - docker run -d --name caddy-extension -p 80:80 codebreaker/caddy-keydb:latest + diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..5c37bb8 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,16 @@ +# Dockerfile +FROM caddy:builder AS builder + +# Install xcaddy +RUN xcaddy build --with + +FROM caddy:latest + +# Copy the built Caddy binary +COPY --from=builder /usr/bin/caddy /usr/bin/caddy + +# Copy your Caddyfile +COPY Caddyfile /etc/caddy/Caddyfile + +# Run Caddy +CMD ["caddy", "run", "--config", "/etc/caddy/Caddyfile"]