Files

33 lines
548 B
Docker
Raw Permalink Normal View History

2025-09-01 08:53:03 -07:00
FROM node:20-slim AS frontend-build
2025-05-19 15:00:11 -07:00
WORKDIR /app/client
2025-09-01 09:26:51 -07:00
COPY client/package*.json ./
2025-05-19 15:00:11 -07:00
RUN npm install
COPY client ./
RUN npm run build
2025-09-01 08:53:03 -07:00
FROM node:20-slim AS app
2025-05-19 15:00:11 -07:00
2025-09-08 20:27:20 -07:00
# Install ping
RUN apt-get update \
&& apt-get install -y iputils-ping \
&& rm -rf /var/lib/apt/lists/*
2025-05-19 15:00:11 -07:00
WORKDIR /app/server
COPY server ./
RUN npm install
2025-09-22 13:26:45 -07:00
RUN npm run build
RUN cp -r src/templates dist/templates
2025-09-22 13:26:45 -07:00
COPY --from=frontend-build /app/client/dist ./public
2025-05-19 15:00:11 -07:00
RUN chmod +x ./scripts/inject-vars.sh
EXPOSE 52345
CMD ./scripts/inject-vars.sh && node ./dist/index.js