Initial commit, based off of the Panblog project.

This commit is contained in:
2026-08-29 18:33:14 -06:00
commit 548a9226e2
11 changed files with 611 additions and 0 deletions

33
Dockerfile Normal file
View File

@@ -0,0 +1,33 @@
# Builds the required node packages.
FROM node:25 AS builder
WORKDIR /app
COPY src/package*.json ./
RUN npm install
FROM node:25 AS production
WORKDIR /app
COPY package*.json ./
COPY src/* ./
# Sets users and permissions.
RUN groupadd --system --gid 1001 sysmailer && \
useradd --uid 1001 --gid 1001 -M -N --system sysmailer
COPY --from=builder --chown=sysmailer:sysmailer /app /app
# De-escelates permissions for improved security.
USER sysmailer
# Defines the expected outputs.
EXPOSE 6868
HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
CMD node -e "require('http').get('http://localhost:8080', (res) => { process.exit(res.statusCode === 200 ? 0 : 1) })"
CMD ["npm", "start"]