updated Dockerfile for snowpack ❄

ref #3
This commit is contained in:
Philipp Dormann 2020-12-22 20:13:15 +01:00
parent 040359aa93
commit 6f787f63f7
2 changed files with 5 additions and 3 deletions

1
.gitignore vendored
View File

@ -4,3 +4,4 @@ node_modules
dist
dist-ssr
public/env.js
/build

View File

@ -1,12 +1,13 @@
FROM node:15.4.0-alpine3.12
WORKDIR /app
RUN npm i -g pnpm
COPY package.json index.html ./
COPY package.json ./
RUN pnpm i
COPY package.json *.config.js ./
COPY src ./src
COPY public ./public
RUN pnpm run build
# final image
FROM fholzer/nginx-brotli:v1.19.1
COPY --from=0 /app/dist /usr/share/nginx/html
COPY --from=0 /app/build /usr/share/nginx/html
COPY ./nginx.conf /etc/nginx/nginx.conf