[feat] Initial code

This commit is contained in:
JasonWu
2021-09-06 18:00:03 +08:00
commit 7dc01d5480
138 changed files with 48947 additions and 0 deletions
+21
View File
@@ -0,0 +1,21 @@
# BUILD STAGE
FROM node:14.14.0 as build
LABEL maintainer="Jason <jason@>"
WORKDIR /build
RUN npm install
COPY [".", "./"]
ARG APP_ENV_ARG="dev"
ENV APP_ENV ${APP_ENV_ARG}
RUN npm run test:coverage && npm run build
# FINAL STAGE
FROM nginx:alpine
EXPOSE 8080
RUN apk add --no-cache ca-certificates
RUN chmod a+rwx /var/cache/nginx /var/run /var/log/nginx
RUN sed -i.bak 's/^user/#user/' /etc/nginx/nginx.conf
COPY --from=build /build/build/ /usr/share/nginx/html/
COPY ["./default.conf", "/etc/nginx/conf.d/default.conf"]