oweme/deploy/Containerfile
agent 8c4e37ce4b Add podman compose deployment, dev script and docs
Containerfile + compose (app + Caddy with automatic HTTPS), env-driven
domain/limits/ports, VAPID key generation that never prints the key.
SPEC updated to match the implementation (Node stdlib server, Svelte SPA,
revert by event id, backup contents, push options).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013FYo6JSV1fDU1fm3LU77iF
2026-10-09 19:59:17 +00:00

29 lines
947 B
Docker

# OweMe: one image with the server (Node standard library only, no
# node_modules) and the built web client. Build context: the repo root.
FROM docker.io/library/node:24.21.0-alpine AS build
WORKDIR /src
COPY package.json package-lock.json ./
COPY packages/core/package.json packages/core/
COPY apps/web/package.json apps/web/
# --ignore-scripts: no install hooks from dependencies run during the build.
RUN npm ci --no-audit --no-fund --ignore-scripts
COPY packages/core packages/core
COPY apps/web apps/web
RUN npm run build -w apps/web
FROM docker.io/library/node:24.21.0-alpine
WORKDIR /app
ENV NODE_ENV=production \
HOST=0.0.0.0 \
PORT=8080 \
DATA_DIR=/data \
STATIC_DIR=/app/web \
TRUST_PROXY=1
COPY apps/server/src ./server
COPY --from=build /src/apps/web/dist ./web
RUN mkdir -p /data && chown node:node /data
USER node
VOLUME /data
EXPOSE 8080
CMD ["node", "--disable-warning=ExperimentalWarning", "server/main.ts"]