fosrl.pangolin/Dockerfile

34 lines
686 B
Text
Raw Normal View History

2024-10-06 09:55:45 -04:00
FROM node:20-alpine AS builder
2024-09-28 18:17:37 -04:00
WORKDIR /app
2025-03-08 18:11:39 -05:00
COPY package.json package-lock.json ./
RUN npm ci
2024-09-28 18:17:37 -04:00
COPY . .
2024-12-25 15:49:35 -05:00
RUN npx drizzle-kit generate --dialect sqlite --schema ./server/db/schema.ts --out init
2024-10-26 23:37:25 -04:00
2024-09-28 18:17:37 -04:00
RUN npm run build
2024-10-06 09:55:45 -04:00
FROM node:20-alpine AS runner
2024-09-28 18:17:37 -04:00
WORKDIR /app
2025-03-08 18:11:39 -05:00
# Curl used for the health checks
RUN apk add --no-cache curl
2024-09-28 18:17:37 -04:00
2025-03-08 18:11:39 -05:00
COPY package.json package-lock.json ./
RUN npm ci --only=production && npm cache clean --force
2024-09-28 18:17:37 -04:00
2025-03-08 18:11:39 -05:00
COPY --from=builder /app/.next/standalone ./
COPY --from=builder /app/.next/static ./.next/static
2024-09-28 18:17:37 -04:00
COPY --from=builder /app/dist ./dist
2024-12-25 16:40:39 -05:00
COPY --from=builder /app/init ./dist/init
2024-10-26 17:01:34 -04:00
COPY server/db/names.json ./dist/names.json
2024-09-28 18:17:37 -04:00
2025-01-04 20:22:01 -05:00
COPY public ./public
2024-09-29 14:37:26 -04:00
CMD ["npm", "start"]