refactor: use default caddy image
This commit is contained in:
parent
0f7e7985d5
commit
6b9d26a883
3 changed files with 10 additions and 53 deletions
|
@ -12,6 +12,11 @@ resources:
|
|||
source:
|
||||
uri: https://code.icb4dc0.de/prskr/blog.git
|
||||
|
||||
- name: caddy-image
|
||||
type: docker-image
|
||||
source:
|
||||
repository: code.icb4dc0.de/prskr/ci-images/caddy
|
||||
|
||||
- name: blog-chart
|
||||
type: helm
|
||||
source:
|
||||
|
@ -26,6 +31,8 @@ jobs:
|
|||
plan:
|
||||
- get: blog.git
|
||||
trigger: true
|
||||
- get: caddy-image
|
||||
trigger: true
|
||||
- task: build-container-image
|
||||
file: blog.git/.concourse/tasks/image.yml
|
||||
input_mapping: {repo: blog.git}
|
||||
|
|
15
Dockerfile
15
Dockerfile
|
@ -2,9 +2,7 @@ FROM docker.io/alpine:latest as builder
|
|||
|
||||
WORKDIR /tmp
|
||||
|
||||
RUN apk add -U --no-cache hugo curl tar jq && \
|
||||
export CADDY_VERSION=$(curl https://api.github.com/repos/caddyserver/caddy/releases/latest | jq -r '.tag_name | (sub("v";""))') && \
|
||||
curl -L https://github.com/caddyserver/caddy/releases/download/v${CADDY_VERSION}/caddy_${CADDY_VERSION}_linux_amd64.tar.gz | tar -xvz caddy
|
||||
RUN apk add -U --no-cache hugo
|
||||
|
||||
WORKDIR /src
|
||||
|
||||
|
@ -12,13 +10,6 @@ COPY . /src/
|
|||
|
||||
RUN hugo --minify --environment production --config config.toml
|
||||
|
||||
FROM gcr.io/distroless/static as final
|
||||
FROM code.icb4dc0.de/prskr/ci-images/caddy:latest as final
|
||||
|
||||
COPY --from=builder /tmp/caddy /bin
|
||||
COPY --from=builder /src/public /usr/share/caddy
|
||||
COPY deploy/caddy/caddy.json /etc/caddy/caddy.json
|
||||
|
||||
EXPOSE 3000
|
||||
|
||||
ENTRYPOINT [ "/bin/caddy" ]
|
||||
CMD [ "run", "--config=/etc/caddy/caddy.json" ]
|
||||
COPY --from=builder /src/public /usr/share/caddy
|
|
@ -1,41 +0,0 @@
|
|||
{
|
||||
"apps": {
|
||||
"http": {
|
||||
"servers": {
|
||||
"blog": {
|
||||
"listen": [
|
||||
":3000"
|
||||
],
|
||||
"metrics": {},
|
||||
"routes": [
|
||||
{
|
||||
"handle": [
|
||||
{
|
||||
"handler": "file_server",
|
||||
"root": "/usr/share/caddy",
|
||||
"index_names": [
|
||||
"index.html"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"metrics" : {
|
||||
"listen": [
|
||||
":9100"
|
||||
],
|
||||
"routes": [
|
||||
{
|
||||
"handle": [
|
||||
{
|
||||
"handler": "metrics"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue