From a295879d6eb1c69eacfcd26ca11c0ad268f53617 Mon Sep 17 00:00:00 2001 From: hackish Date: Tue, 13 Aug 2024 22:21:20 -0700 Subject: [PATCH] ci test --- .woodpecker.yml | 18 ++++++++++++++++++ Dockerfile | 16 ++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 .woodpecker.yml create mode 100644 Dockerfile 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"]