2023-12-30 02:25:49 +01:00
|
|
|
FROM node:20 AS builder
|
2022-06-30 19:13:43 +02:00
|
|
|
|
|
|
|
WORKDIR /app
|
|
|
|
|
2023-12-15 23:22:16 +01:00
|
|
|
COPY package.json pnpm-lock.yaml ./
|
2023-12-15 23:25:20 +01:00
|
|
|
RUN corepack enable
|
2023-12-15 23:22:16 +01:00
|
|
|
RUN pnpm install
|
2022-06-30 19:13:43 +02:00
|
|
|
|
|
|
|
COPY . .
|
|
|
|
|
2023-12-15 23:22:16 +01:00
|
|
|
RUN pnpm build
|
2022-06-30 19:13:43 +02:00
|
|
|
|
|
|
|
# nginx state for serving content
|
|
|
|
FROM nginx:alpine
|
|
|
|
# Set working directory to nginx asset directory
|
|
|
|
WORKDIR /usr/share/nginx/html
|
|
|
|
# Remove default nginx static assets
|
|
|
|
RUN rm -rf ./*
|
|
|
|
# Copy static assets from builder stage
|
|
|
|
COPY --from=builder /app/dist .
|
2022-07-04 11:36:31 +02:00
|
|
|
COPY nginx/nginx.conf /etc/nginx/conf.d/default.conf
|
2022-06-30 19:13:43 +02:00
|
|
|
# Containers run nginx with global directives and daemon off
|
|
|
|
ENTRYPOINT ["nginx", "-g", "daemon off;"]
|
|
|
|
|
|
|
|
LABEL \
|
|
|
|
org.label-schema.name="Claptrap Bot" \
|
|
|
|
org.label-schema.url="https://claptrapbot.com" \
|
|
|
|
org.label-schema.vcs-url="https://github.com/Sebclem/Claptrap-ui" \
|
|
|
|
org.label-schema.vendor="Sebclem"
|