diff options
Diffstat (limited to 'frontend')
| -rw-r--r-- | frontend/.dockerignore | 3 | ||||
| -rw-r--r-- | frontend/Dockerfile | 28 |
2 files changed, 31 insertions, 0 deletions
diff --git a/frontend/.dockerignore b/frontend/.dockerignore new file mode 100644 index 0000000..9cabb19 --- /dev/null +++ b/frontend/.dockerignore @@ -0,0 +1,3 @@ +/node_modules +/.cache +/build diff --git a/frontend/Dockerfile b/frontend/Dockerfile new file mode 100644 index 0000000..974725e --- /dev/null +++ b/frontend/Dockerfile @@ -0,0 +1,28 @@ +ARG ALBATROSS_HOST + +FROM node:20.14.0 AS builder + +WORKDIR /app +ENV NODE_ENV=production + +COPY package.json package-lock.json . +RUN npm install --include=dev + +COPY . . +RUN npm run build + +################################################################################ +FROM node:20.14.0 + +WORKDIR /app +ENV NODE_ENV=production + +COPY package.json package-lock.json . +RUN npm install --omit=dev + +COPY --from=builder /app/build ./build + +ENV HOST="$ALBATROSS_HOST" +ENV PORT=80 +EXPOSE 80 +CMD ["npm", "run", "start"] |
