2024-06-20 04:47:17 +02:00
|
|
|
FROM imbios/bun-node:21-alpine AS base
|
2024-04-15 03:16:57 +02:00
|
|
|
|
|
|
|
|
# Install dependencies into temp directory
|
|
|
|
|
# This will cache them and speed up future builds
|
|
|
|
|
FROM base AS install
|
2024-06-20 04:31:09 +02:00
|
|
|
|
2024-04-15 03:16:57 +02:00
|
|
|
RUN mkdir -p /temp/dev
|
|
|
|
|
COPY package.json bun.lockb /temp/dev/
|
|
|
|
|
RUN cd /temp/dev && bun install --frozen-lockfile
|
|
|
|
|
|
|
|
|
|
FROM base AS builder
|
|
|
|
|
|
2024-06-20 04:31:09 +02:00
|
|
|
COPY . /app
|
2024-04-15 03:16:57 +02:00
|
|
|
COPY --from=install /temp/dev/node_modules /app/node_modules
|
2024-06-20 04:47:17 +02:00
|
|
|
RUN cd /app && bun run build --preset node-server
|
2024-04-15 03:16:57 +02:00
|
|
|
|
2024-06-20 04:47:17 +02:00
|
|
|
FROM node:21-alpine as final
|
2024-04-15 03:16:57 +02:00
|
|
|
|
|
|
|
|
COPY --from=builder /app/.output/ /app
|
|
|
|
|
|
|
|
|
|
LABEL org.opencontainers.image.authors "Gaspard Wierzbinski (https://cpluspatch.com)"
|
|
|
|
|
LABEL org.opencontainers.image.source "https://github.com/lysand-org/lysand-fe"
|
|
|
|
|
LABEL org.opencontainers.image.vendor "Lysand Org"
|
|
|
|
|
LABEL org.opencontainers.image.licenses "AGPL-3.0"
|
|
|
|
|
LABEL org.opencontainers.image.title "Lysand-FE"
|
|
|
|
|
LABEL org.opencontainers.image.description "Frontend for the Lysand Project"
|
|
|
|
|
|
2024-04-22 10:10:14 +02:00
|
|
|
WORKDIR /app
|
2024-04-25 09:25:54 +02:00
|
|
|
CMD ["node", "server/index.mjs"]
|