ff-admin-server/Dockerfile

47 lines
791 B
Text
Raw Normal View History

2024-10-21 08:38:14 +00:00
FROM node:18-alpine AS build
2024-12-21 09:18:07 +00:00
RUN apk add --no-cache \
chromium \
nss \
freetype \
harfbuzz \
ca-certificates \
ttf-freefont
2024-10-21 08:38:14 +00:00
WORKDIR /app
COPY package*.json ./
2024-12-21 09:18:07 +00:00
ENV PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium-browser
2024-10-21 08:38:14 +00:00
RUN npm install
COPY . /app
RUN npm run build
FROM node:18-alpine AS prod
2024-12-21 09:18:07 +00:00
RUN apk add --no-cache \
chromium \
nss \
freetype \
harfbuzz \
ca-certificates \
ttf-freefont
2024-10-21 08:38:14 +00:00
WORKDIR /app
2024-12-21 09:18:07 +00:00
RUN mkdir -p /app/export
ENV PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium-browser
2025-01-06 09:38:39 +00:00
ENV SERVER_PORT=5000
2024-12-21 09:18:07 +00:00
COPY --from=build /app/src/templates /app/src/templates
2024-10-21 08:38:14 +00:00
COPY --from=build /app/dist /app/dist
COPY --from=build /app/node_modules /app/node_modules
COPY --from=build /app/package.json /app/package.json
2025-01-06 09:38:39 +00:00
EXPOSE ${SERVER_PORT}
2024-10-21 08:38:14 +00:00
CMD [ "npm", "run", "start" ]