updating .dockignore file and fixing dockerfile
This commit is contained in:
parent
f8e8acd9e9
commit
4853d4fae4
@ -4,4 +4,7 @@ node_modules/
|
|||||||
Dockerfile
|
Dockerfile
|
||||||
.DS_Store
|
.DS_Store
|
||||||
.gitignore
|
.gitignore
|
||||||
README.md
|
README.md
|
||||||
|
.vscode
|
||||||
|
.circleci
|
||||||
|
example/
|
||||||
|
|||||||
12
dockerfile
12
dockerfile
@ -14,21 +14,13 @@ COPY yarn.lock /usr/src/app/yarn.lock
|
|||||||
|
|
||||||
ADD . /usr/src/app/
|
ADD . /usr/src/app/
|
||||||
RUN yarn install
|
RUN yarn install
|
||||||
RUN yarn run prepare
|
RUN yarn run build:web
|
||||||
|
|
||||||
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
|
|
||||||
|
|
||||||
# # Stage 2: Bundle the built application into a Docker container
|
# # Stage 2: Bundle the built application into a Docker container
|
||||||
# # which runs Nginx using Alpine Linux
|
# # which runs Nginx using Alpine Linux
|
||||||
FROM nginx:1.15.5-alpine
|
FROM nginx:1.15.5-alpine
|
||||||
RUN rm -rf /etc/nginx/conf.d
|
RUN rm -rf /etc/nginx/conf.d
|
||||||
COPY conf /etc/nginx
|
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
|
EXPOSE 80
|
||||||
CMD ["nginx", "-g", "daemon off;"]
|
CMD ["nginx", "-g", "daemon off;"]
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user