fosrl.pangolin/Dockerfile

33 lines
618 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
2024-10-06 11:13:50 -04:00
COPY package.json ./
2024-09-28 18:17:37 -04:00
2024-10-26 17:01:34 -04:00
RUN npm install --legacy-peer-deps
2024-09-28 18:17:37 -04:00
COPY . .
2024-10-26 23:37:25 -04:00
RUN npx drizzle-kit generate --dialect sqlite --schema ./server/db/schema.ts --out migrations
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
2024-09-29 16:12:33 -04:00
RUN apk add --no-cache curl
2024-09-28 18:17:37 -04:00
WORKDIR /app
2024-10-06 11:13:50 -04:00
COPY package.json ./
2024-09-28 18:17:37 -04:00
2024-10-26 17:01:34 -04:00
RUN npm install --omit=dev --legacy-peer-deps
2024-09-28 18:17:37 -04:00
COPY --from=builder /app/.next ./.next
COPY --from=builder /app/dist ./dist
2024-10-26 23:37:25 -04:00
COPY --from=builder /app/migrations ./dist/migrations
2024-10-26 17:01:34 -04:00
COPY config.example.yml ./dist/config.example.yml
COPY server/db/names.json ./dist/names.json
2024-09-28 18:17:37 -04:00
2024-09-29 14:37:26 -04:00
CMD ["npm", "start"]