Convert the app from the Windows/server2 share deployment to a Docker stack deployed through Portainer behind Nginx Proxy Manager. - Serve the Project Images library (it returned 403) from the mounted folder - Make the InDesign export work in a container: load app images from disk, run Chromium without the sandbox, and wait for its full output - Return error messages instead of stack traces; cap export request size - Warn at startup about missing sign-in settings or an unwritable data folder - compose.yaml: join NPM's network, take all settings from stack variables, require absolute host paths for data and the photo library - Add .dockerignore, .env.example, and .gitignore - Stop tracking data, Project Images, Backups, and InDesign Exports - Remove the share publishing, Windows host, and browser migration scripts - Rewrite the README for Portainer and NPM deployment Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
31 lines
959 B
Docker
31 lines
959 B
Docker
FROM node:22-bookworm-slim
|
|
|
|
ARG APP_VERSION=1.0.0
|
|
|
|
ENV NODE_ENV=production \
|
|
HOST=0.0.0.0 \
|
|
PORT=4181 \
|
|
CHROMIUM_EXECUTABLE=/usr/bin/chromium \
|
|
CHROMIUM_NO_SANDBOX=1 \
|
|
PROPOSAL_BOT_VERSION=${APP_VERSION}
|
|
|
|
RUN apt-get update \
|
|
&& apt-get install -y --no-install-recommends chromium fonts-dejavu-core fonts-liberation ca-certificates \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
WORKDIR /app
|
|
|
|
COPY --chown=node:node server.js shared-drafts.js app.js index.html styles.css indesign-template.js version.json ./
|
|
COPY --chown=node:node ["MA Logo.jpg", "./MA Logo.jpg"]
|
|
COPY --chown=node:node assets ./assets
|
|
RUN mkdir -p "/app/Project Images" "/app/data" && chown -R node:node /app
|
|
|
|
USER node
|
|
|
|
EXPOSE 4181
|
|
|
|
HEALTHCHECK --interval=30s --timeout=5s --start-period=15s --retries=3 \
|
|
CMD node -e "fetch('http://127.0.0.1:4181/api/health').then((response) => process.exit(response.ok ? 0 : 1)).catch(() => process.exit(1))"
|
|
|
|
CMD ["node", "server.js"]
|