From 4853d4fae4dea6cffd4ffc8738f573dfc7e67df4 Mon Sep 17 00:00:00 2001 From: biharck Date: Tue, 30 Apr 2019 10:35:09 -0300 Subject: [PATCH] updating .dockignore file and fixing dockerfile --- .dockerignore | 5 ++++- dockerfile | 12 ++---------- 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/.dockerignore b/.dockerignore index 6bc552f91..750935f33 100644 --- a/.dockerignore +++ b/.dockerignore @@ -4,4 +4,7 @@ node_modules/ Dockerfile .DS_Store .gitignore -README.md \ No newline at end of file +README.md +.vscode +.circleci +example/ diff --git a/dockerfile b/dockerfile index 6ec8252e6..f20d2ac68 100644 --- a/dockerfile +++ b/dockerfile @@ -14,21 +14,13 @@ COPY yarn.lock /usr/src/app/yarn.lock ADD . /usr/src/app/ RUN yarn install -RUN yarn run prepare - -WORKDIR /usr/src/app/example - -RUN yarn install -RUN yarn run prepare - -RUN sed -i "s,http://localhost:5000,http://localhost,g" index.html -RUN sed -i 's,"routerBasename": "/","routerBasename": "/demo",g' index.html +RUN yarn run build:web # # Stage 2: Bundle the built application into a Docker container # # which runs Nginx using Alpine Linux FROM nginx:1.15.5-alpine RUN rm -rf /etc/nginx/conf.d COPY conf /etc/nginx -COPY --from=builder /usr/src/app/example /usr/share/nginx/html +COPY --from=builder /usr/src/app/public /usr/share/nginx/html EXPOSE 80 CMD ["nginx", "-g", "daemon off;"]