Repo created
This commit is contained in:
parent
f3a6b3a320
commit
f954c78789
614 changed files with 135712 additions and 2 deletions
25
Dockerfile
Normal file
25
Dockerfile
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
|
||||
## Dependency Stage ##
|
||||
FROM node:18-alpine AS dep
|
||||
WORKDIR /app
|
||||
COPY package.json ./package.json
|
||||
COPY yarn.lock ./yarn.lock
|
||||
# copy `dist` if it exists already
|
||||
COPY dis[t]/web ./dist/web
|
||||
# git is needed for jinter
|
||||
RUN apk add git
|
||||
# don't rebuild if you don't have to
|
||||
RUN if [ ! -d 'dist/web' ]; then yarn ci; fi
|
||||
|
||||
## Build Stage ##
|
||||
FROM node:18-alpine AS build
|
||||
WORKDIR /app
|
||||
COPY . .
|
||||
COPY --from=dep /app/dis[t]/web ./dist/web
|
||||
COPY --from=dep /app/node_module[s] ./node_modules
|
||||
# don't rebuild if you don't have to
|
||||
RUN if [ ! -d 'dist/web' ]; then yarn pack:web; fi
|
||||
|
||||
## App Stage ##
|
||||
FROM nginx:latest as app
|
||||
COPY --from=build /app/dist/web /usr/share/nginx/html
|
||||
Loading…
Add table
Add a link
Reference in a new issue