- Login/register with JWT auth - User profile (age, weight, height, goal, country) - AI trainer agent: 7-day workout programs by goal - AI dietitian agent: calorie-based meal plans with Turkish cuisine - Shopping list generator from meal plans - Modern Turkish UI (SPA) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
30 lines
765 B
Docker
30 lines
765 B
Docker
# Stage 1: Install dependencies
|
|
FROM node:20-alpine AS deps
|
|
WORKDIR /app
|
|
RUN apk add --no-cache python3 make g++
|
|
COPY package.json package-lock.json* ./
|
|
RUN npm ci --omit=dev && npm cache clean --force
|
|
|
|
# Stage 2: Production image
|
|
FROM node:20-alpine AS runtime
|
|
ENV NODE_ENV=production
|
|
WORKDIR /app
|
|
|
|
RUN addgroup -g 1001 -S appgroup && \
|
|
adduser -u 1001 -S appuser -G appgroup && \
|
|
mkdir -p /tmp/health-app && chown appuser:appgroup /tmp/health-app
|
|
|
|
COPY --from=deps /app/node_modules ./node_modules
|
|
COPY src ./src
|
|
COPY package.json ./
|
|
|
|
RUN chown -R appuser:appgroup /app
|
|
USER appuser
|
|
|
|
EXPOSE 3000
|
|
|
|
HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
|
|
CMD wget -qO- http://localhost:3000/health || exit 1
|
|
|
|
CMD ["node", "src/server.js"]
|