CJVT updates August and September 2026
This commit is contained in:
+16
-2
@@ -1,16 +1,30 @@
|
||||
# syntax=docker/dockerfile:1
|
||||
|
||||
FROM node:16-alpine
|
||||
# ---- Compile SCSS to CSS (public/stylesheets is gitignored, not built by npm ci) ----
|
||||
FROM node:24.18.0-alpine3.24 AS assets
|
||||
|
||||
WORKDIR /usr/src/app
|
||||
COPY package*.json ./
|
||||
RUN npm ci --silent
|
||||
COPY public/sass ./public/sass
|
||||
RUN npm run sass:build:prod
|
||||
|
||||
# ---- Production image ----
|
||||
FROM node:24.18.0-alpine3.24
|
||||
|
||||
# Curl is used in cron batch file.
|
||||
RUN apk --no-cache add curl
|
||||
|
||||
# TODO: consider running as a non-root USER (both here and in the dev Dockerfile).
|
||||
|
||||
WORKDIR /usr/src/app
|
||||
|
||||
COPY package*.json ./
|
||||
RUN npm install --production --silent
|
||||
RUN npm ci --omit=dev --silent
|
||||
|
||||
COPY . .
|
||||
RUN rm -rf public/sass
|
||||
COPY --from=assets /usr/src/app/public/stylesheets ./public/stylesheets
|
||||
|
||||
COPY scheduled/crontab /var/spool/cron/crontabs/root
|
||||
RUN which crond && \
|
||||
|
||||
Reference in New Issue
Block a user