Thin proxy between React app and Directus. Admin token stays server-side; clients get own 30-day JWTs. Endpoints: /auth/* register/login/profile/me, /words, /questions, /qa-pairs, /pair, /progress, /assets/:fileId Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
26 lines
340 B
Docker
26 lines
340 B
Docker
# Stage 1: Build
|
|
FROM node:20-alpine AS build
|
|
|
|
WORKDIR /app
|
|
|
|
COPY package*.json ./
|
|
RUN npm ci
|
|
|
|
COPY tsconfig.json ./
|
|
COPY src ./src
|
|
RUN npm run build
|
|
|
|
# Stage 2: Runtime
|
|
FROM node:20-alpine AS runtime
|
|
|
|
WORKDIR /app
|
|
|
|
COPY package*.json ./
|
|
RUN npm ci --omit=dev
|
|
|
|
COPY --from=build /app/dist ./dist
|
|
|
|
EXPOSE 3000
|
|
|
|
CMD ["node", "dist/index.js"]
|