Implement dynamic envs (#19)

Reviewed-on: https://git.badhouseplants.net/allanger/badhouseplants-net/pulls/19
This commit is contained in:
Nikolai Rodionov
2023-02-25 20:25:16 +00:00
parent c85c686e80
commit 80058b11b1
16 changed files with 725 additions and 89 deletions

View File

@ -1,16 +1,4 @@
FROM alpine:latest AS builder
FROM git.badhouseplants.net/badhouseplants/hugo-builder
WORKDIR /src
COPY . /src
ARG GOHUGO_LINK=https://github.com/gohugoio/hugo/releases/download/v0.110.0/hugo_0.110.0_linux-amd64.tar.gz
RUN apk update && apk add curl tar
RUN curl -LJO ${GOHUGO_LINK} && tar -xf hugo_0.110.0_linux-amd64.tar.gz
RUN mv /src/hugo /usr/local/bin/hugo
RUN chmod +x /usr/local/bin/hugo
RUN hugo
FROM nginx:stable-alpine
COPY --from=builder /src/public /var/www
COPY configs/nginx.conf /etc/nginx/conf.d/default.conf
EXPOSE 80
CMD [ "nginx", "-g", "daemon off;" ]
ENTRYPOINT ["hugo"]