1
Fork 0
theorangeone.net-legacy/Dockerfile

29 lines
556 B
Text
Raw Normal View History

2020-04-09 22:06:58 +01:00
# Site Build
2020-04-09 22:12:27 +01:00
FROM node:lts-slim as build
2020-04-09 22:06:58 +01:00
ENV NODE_ENV production
2020-07-23 18:37:02 +01:00
ENV HUGO_VERSION=0.73.0
2020-04-09 22:06:58 +01:00
WORKDIR /app
2020-04-09 22:06:58 +01:00
RUN apt-get update && apt-get install -y ca-certificates
COPY . /app
RUN npm ci --production
ADD https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_Linux-64bit.deb /tmp/hugo.deb
RUN dpkg -i /tmp/hugo.deb
2020-04-09 22:06:58 +01:00
RUN ./scripts/release.sh
# Production run
FROM nginx:stable-alpine
RUN rm /var/log/nginx/access.log
2020-04-09 22:06:58 +01:00
COPY nginx.conf /etc/nginx/nginx.conf
COPY --from=build /app/public/ /usr/share/nginx/html