Skip to content

Commit 26a4d5a

Browse files
author
vlad
committed
change Docker from dev to prod env
1 parent 6e57515 commit 26a4d5a

File tree

6 files changed

+14614
-9
lines changed

6 files changed

+14614
-9
lines changed

.gitignore

-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
.DS_Store
22
.thumbs.db
33
node_modules
4-
package-lock.json
54

65
# Quasar core related directories
76
.quasar

Dockerfile

+16-5
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,23 @@
1-
FROM node:14.13-alpine
2-
WORKDIR '/app'
3-
COPY ./package.json ./
1+
FROM node:14.13-alpine as ui-builder
2+
RUN mkdir /app
3+
WORKDIR /app
4+
5+
COPY ./package*.json ./
6+
47
RUN npm install
58

69
RUN npm install -g @quasar/cli && \
710
npm install -g @vue/cli && \
811
npm install -g @vue/cli-init
912

10-
1113
COPY . .
12-
CMD ["quasar", "dev"]
14+
15+
RUN quasar build
16+
17+
FROM nginx:1.17.0-alpine
18+
RUN rm /usr/share/nginx/html/*
19+
COPY --from=ui-builder /app/dist/spa /usr/share/nginx/html
20+
21+
EXPOSE 80
22+
23+
CMD sed -i -e "s#{{ API_URL }}#$API_URL#g" /usr/share/nginx/html/js/app.*.js && nginx -g "daemon off;"

0 commit comments

Comments
 (0)