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-12-30 15:48:34 -05:00
|
|
|
RUN npm install
|
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
|
|
|
|
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-12-30 15:48:34 -05:00
|
|
|
RUN npm install --omit=dev
|
2024-09-28 18:17:37 -04:00
|
|
|
|
|
|
|
COPY --from=builder /app/.next ./.next
|
|
|
|
COPY --from=builder /app/dist ./dist
|
2024-12-25 16:40:39 -05:00
|
|
|
COPY --from=builder /app/init ./dist/init
|
2024-10-25 00:05:43 -04:00
|
|
|
|
2025-01-15 23:26:31 -05:00
|
|
|
COPY config/traefik/traefik_config.example.yml ./dist/traefik_config.example.yml
|
|
|
|
COPY config/traefik/dynamic_config.example.yml ./dist/dynamic_config.example.yml
|
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"]
|