add README
This commit is contained in:
34
Dockerfile
Executable file
34
Dockerfile
Executable file
@@ -0,0 +1,34 @@
|
||||
FROM node:11.1.0-alpine AS base
|
||||
LABEL version="4.0.0"
|
||||
LABEL description=""
|
||||
|
||||
WORKDIR /usr/src/app
|
||||
COPY ["package.json", "./"]
|
||||
COPY ["package-lock.json", "./"]
|
||||
|
||||
FROM base AS builder
|
||||
# ENV PARCEL_WORKERS=2
|
||||
RUN npm set progress=false && npm config set depth 0 && npm install
|
||||
COPY ["src/", "./src"]
|
||||
# ARG VERSION=Missing
|
||||
# ENV VERSION=$VERSION
|
||||
# ARG COMMIT=Missing
|
||||
# ENV COMMIT=$COMMIT
|
||||
RUN npm run Prod
|
||||
|
||||
FROM nginx:1.14.1-alpine as Web
|
||||
LABEL maintainer="MrFlutters (https://github.com/MrFlutters)"
|
||||
COPY docker/nginx.conf /etc/nginx/nginx.conf
|
||||
COPY docker/web.conf /etc/nginx/conf.d/web.conf
|
||||
|
||||
LABEL traefik.backend=fluttershub_home
|
||||
LABEL traefik.frontend.rule="Host:fluttershub.com"
|
||||
LABEL traefik.docker.network=web
|
||||
LABEL traefik.frontend.redirect.entryPoint=https
|
||||
LABEL traefik.enable=true
|
||||
LABEL traefik.port=80
|
||||
|
||||
EXPOSE 80
|
||||
RUN rm -Rf /usr/share/nginx/html/ && rm /etc/nginx/conf.d/default.conf
|
||||
COPY --from=builder /usr/src/app/build /usr/share/nginx/html/
|
||||
CMD [ "nginx", "-g", "daemon off;" ]
|
||||
Reference in New Issue
Block a user