Browse Source

Add docker

main
Haris Razis 4 years ago
parent
commit
e4705893a9
No known key found for this signature in database GPG Key ID: 86A4D290ED03FAB4
  1. 13
      web/Dockerfile
  2. 2
      web/web.sh

13
web/Dockerfile

@ -0,0 +1,13 @@
# build stage
FROM node:lts-alpine as build-stage
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY . .
RUN npm run build
# production stage
FROM nginx:stable-alpine as production-stage
COPY --from=build-stage /app/dist /usr/share/nginx/html
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]

2
web/web.sh

@ -0,0 +1,2 @@
docker build -t xrazis/web .
docker run -d -p 8090:80 xrazis/web
Loading…
Cancel
Save