Stuff
This commit is contained in:
parent
f7bd710fc0
commit
88a8273ebc
3 changed files with 13 additions and 8 deletions
15
Dockerfile
15
Dockerfile
|
@ -1,13 +1,18 @@
|
||||||
FROM node:lts
|
FROM node:lts AS source-code
|
||||||
RUN npm install -g http-server
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY package*.json ./
|
|
||||||
RUN npm install
|
|
||||||
COPY . .
|
COPY . .
|
||||||
|
RUN npm install
|
||||||
RUN npm run build
|
RUN npm run build
|
||||||
|
|
||||||
|
|
||||||
|
FROM nginx:1.17
|
||||||
|
|
||||||
|
WORKDIR /usr/share/nginx/html
|
||||||
|
|
||||||
|
COPY --from=source-code /app/dist /usr/share/nginx/html
|
||||||
|
|
||||||
COPY docker/start.sh /start.sh
|
COPY docker/start.sh /start.sh
|
||||||
RUN chmod uog+rwx /start.sh
|
RUN chmod uog+rwx /start.sh
|
||||||
|
|
||||||
EXPOSE 8080
|
EXPOSE 80
|
||||||
CMD [ "/start.sh"]
|
CMD [ "/start.sh"]
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
echo $VUE_APP_API_URL > dist/apiurl
|
echo $VUE_APP_API_URL > /usr/share/nginx/html/apiurl
|
||||||
http-server dist
|
nginx -g 'daemon off;'
|
||||||
|
|
Reference in a new issue