mirror of
https://github.com/viliusle/miniPaint.git
synced 2026-02-06 13:36:45 +00:00
[add] Basic Dockerfile
Still needs some work to load the favicon
This commit is contained in:
parent
3716709a9b
commit
8d75a80ac6
4
.dockerignore
Normal file
4
.dockerignore
Normal file
@ -0,0 +1,4 @@
|
||||
.git
|
||||
node_modules
|
||||
Dockerfile
|
||||
dist/
|
||||
21
Dockerfile
Normal file
21
Dockerfile
Normal file
@ -0,0 +1,21 @@
|
||||
# Stage 1 - the build process
|
||||
FROM node:12 as build-deps
|
||||
|
||||
WORKDIR /usr/src/app
|
||||
|
||||
COPY package.json /usr/src/app
|
||||
COPY package-lock.json /usr/src/app
|
||||
RUN npm install
|
||||
|
||||
COPY . /usr/src/app
|
||||
RUN npm run build
|
||||
|
||||
# Stage 2 - the production environment
|
||||
FROM nginx:1-alpine
|
||||
|
||||
COPY --from=build-deps /usr/src/app/dist /usr/share/nginx/html/dist
|
||||
COPY --from=build-deps /usr/src/app/index.html /usr/share/nginx/html
|
||||
COPY --from=build-deps /usr/src/app/images /usr/share/nginx/html/images
|
||||
|
||||
EXPOSE 80
|
||||
CMD ["nginx", "-g", "daemon off;"]
|
||||
Loading…
Reference in New Issue
Block a user