-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
37 lines (28 loc) · 1.01 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
FROM node:20-slim AS buildbase
ENV PNPM_HOME="/pnpm"
ENV PATH="$PNPM_HOME:$PATH"
RUN corepack enable
COPY . /app
WORKDIR /app
RUN pnpm install --frozen-lockfile
FROM buildbase AS buildprod
RUN pnpm build:prod
FROM buildbase AS buildlava
ARG version=dev
RUN sed -ri 's/"version": "[0-9]+\.[0-9]+\.[0-9]+"/"version": "'"$version"'"/g' package.json
RUN pnpm build:lava
FROM buildbase AS buildlocal
ARG version=dev
RUN sed -ri 's/"version": "[0-9]+\.[0-9]+\.[0-9]+"/"version": "'"$version"'"/g' package.json
RUN pnpm build:local
FROM nginx:alpine3.18-slim AS base
LABEL org.opencontainers.image.source=https://github.com/DatepollSystems/WaiterRobot-Web
COPY ./public /var/www/public
COPY ./nginx.conf /etc/nginx/conf.d/default.conf
EXPOSE 80
FROM base AS prod
COPY --from=buildprod /app/dist/WaiterRobot-Web/browser /var/www/kellner-web
FROM base AS lava
COPY --from=buildlava /app/dist/WaiterRobot-Web/browser /var/www/kellner-web
FROM base AS local
COPY --from=buildlocal /app/dist/WaiterRobot-Web/browser /var/www/kellner-web