Skip to content

Commit f923d12

Browse files
authored
Merge pull request #1 from jum/develop
Develop
2 parents 19ea589 + 8b0dac2 commit f923d12

File tree

3 files changed

+10
-4
lines changed

3 files changed

+10
-4
lines changed

Dockerfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
# Dockerfile for building the project with static assets
2-
FROM --platform=$BUILDPLATFORM golang:1.21-bullseye as build
2+
FROM --platform=$BUILDPLATFORM golang:1.22-bullseye as build
33

44
WORKDIR /goapp
55
ARG TARGETOS TARGETARCH
6+
ARG CADDY_VERSION=latest
67
ENV CGO_ENABLED=0
78

89
RUN --mount=type=cache,target=/root/.cache/go-build \
@@ -12,7 +13,7 @@ RUN --mount=type=cache,target=/root/.cache/go-build \
1213
RUN --mount=type=cache,target=/root/.cache/go-build \
1314
--mount=type=cache,target=/go/pkg \
1415
GOOS=${TARGETOS} GOARCH=${TARGETARCH} \
15-
xcaddy build \
16+
xcaddy build ${CADDY_VERSION} \
1617
--with github.com/pberkel/caddy-storage-redis \
1718
--with github.com/caddy-dns/cloudflare \
1819
--with github.com/lucaslorentz/caddy-docker-proxy/v2

build_docker.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
#!/bin/sh
22
DOCKER_PREFIX=jumager/caddy
33
branch=$(basename $(git rev-parse --abbrev-ref HEAD))
4-
docker buildx build --platform linux/arm64,linux/amd64 -t ${DOCKER_PREFIX}:${branch} -f Dockerfile --push .
4+
CADDY_VERSION=latest
5+
if test X$branch = Xdevelop
6+
then
7+
CADDY_VERSION=master
8+
fi
9+
docker buildx build --platform linux/arm64,linux/amd64 --build-arg CADDY_VERSION=master -t ${DOCKER_PREFIX}:${branch} -f Dockerfile --push .

caddy/config/Caddyfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@
6969
}
7070
@forbidden {
7171
path /build/* /tests/* /config/* /lib/* /3rdparty/* /templates/* /data/*
72-
path /.* /autotest* /occ* /issue* /indie* /db_* /console*
72+
path /autotest* /occ* /issue* /indie* /db_* /console*
7373
not path /.well-known/*
7474
}
7575
error @forbidden 404

0 commit comments

Comments
 (0)