Add Summit Stride 5K training tracker at /running
Node/Express backend with SQLite storage, WebAuthn passkey auth, and React frontend built via Vite. Caddy routes /running/* via handle_path labels on docker-compose.
This commit is contained in:
18
apps/running/Dockerfile
Normal file
18
apps/running/Dockerfile
Normal file
@@ -0,0 +1,18 @@
|
||||
# Stage 1: Build frontend
|
||||
FROM node:20-alpine AS builder
|
||||
WORKDIR /app/src
|
||||
COPY src/package.json ./
|
||||
RUN npm install
|
||||
COPY src/ ./
|
||||
RUN npm run build
|
||||
|
||||
# Stage 2: Production server
|
||||
FROM node:20-alpine
|
||||
WORKDIR /app
|
||||
COPY package.json ./
|
||||
RUN npm install --omit=dev
|
||||
COPY server.js ./
|
||||
COPY --from=builder /app/src/dist ./public
|
||||
RUN mkdir -p /app/data
|
||||
EXPOSE 8080
|
||||
CMD ["node", "server.js"]
|
||||
Reference in New Issue
Block a user