I firmly believe in free software. The application I'm making here have capabilities that I've not seen in any system. It presents itself as an opportunity to collaborate on a tool that serves the people rather than corporations. Whose incentives are to help people rather, not make the most money. And whose terms ensure that these freedoms and incentives cannot be taken back or subverted. I license this software under the AGPL.
37 lines
850 B
Docker
37 lines
850 B
Docker
# syntax=docker.io/docker/dockerfile:1
|
|
# SPDX-FileCopyrightText: © 2025 Hornwitser <code@hornwitser.no>
|
|
# SPDX-License-Identifier: AGPL-3.0-or-later
|
|
# Based on Next.js's docker image example
|
|
FROM node:22 AS base
|
|
|
|
# Install dependencies only when needed
|
|
FROM base AS deps
|
|
WORKDIR /app
|
|
|
|
COPY package.json pnpm-lock.yaml* ./
|
|
RUN corepack enable pnpm && pnpm i --frozen-lockfile
|
|
|
|
# Rebuild the source code only when needed
|
|
FROM base AS builder
|
|
WORKDIR /app
|
|
COPY --from=deps /app/node_modules ./node_modules
|
|
COPY . .
|
|
|
|
RUN corepack enable pnpm && pnpm run build
|
|
|
|
# Production image, copy all the files and run Nuxt
|
|
FROM base AS runner
|
|
WORKDIR /app
|
|
|
|
COPY --from=builder /app/.output ./
|
|
RUN install --owner=node --group=node --directory data
|
|
VOLUME [ "/app/data" ]
|
|
|
|
USER node
|
|
|
|
EXPOSE 3000
|
|
|
|
ENV PORT=3000
|
|
ENV HOST="0.0.0.0"
|
|
|
|
CMD ["node", "server/index.mjs"]
|