Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 18 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
FROM node:22-alpine AS dev

WORKDIR /workspace

COPY package*.json ./
RUN npm ci

COPY . .
RUN mkdir -p /workspace-seed && cp -R src /workspace-seed/src

# Polling makes file watching reliable with Docker bind mounts.
ENV CHOKIDAR_USEPOLLING=true

EXPOSE 80 4200

CMD ["sh", "-c", "if [ ! -f src/main.ts ]; then cp -R /workspace-seed/src/. src/; fi; exec npm start -- --host 0.0.0.0 --port 80 --poll 1000"]

FROM --platform=${BUILDPLATFORM} node:22-alpine AS build

WORKDIR /workspace
Expand Down Expand Up @@ -51,4 +68,4 @@ COPY --from=build /workspace/dist/app/browser /usr/share/nginx/html
EXPOSE 80 443

# Command to run NGINX in foreground
CMD ["nginx", "-g", "daemon off;"]
CMD ["nginx", "-g", "daemon off;"]
Loading