Mirror of https://forge.levinkeller.de/levin/dorfarchiv.git
141ee6795164aa968880489dbc53a69a6c10e1c8
26 lines · 595 B
| 1 | FROM node:alpine AS builder |
| 2 | |
| 3 | WORKDIR /usr/src/app |
| 4 | |
| 5 | COPY package.json package-lock.json ./ |
| 6 | |
| 7 | RUN npm ci |
| 8 | # Copy the rest of the source files into the image. |
| 9 | COPY . . |
| 10 | |
| 11 | RUN npm run build |
| 12 | |
| 13 | FROM ghcr.io/levino/levins-pocketbase-auth-layer:v1 |
| 14 | |
| 15 | ENV POCKETBASE_URL=https://api.levinkeller.de |
| 16 | ENV POCKETBASE_GROUP=example |
| 17 | ENV PORT=8000 |
| 18 | EXPOSE 8000 |
| 19 | |
| 20 | # Copy the built files from the builder stage |
| 21 | COPY --from=builder /usr/src/app/build /app/build |
| 22 | |
| 23 | COPY --from=builder /usr/src/app/node_modules/pocketbase/dist/pocketbase.umd.js /app/build/public/ |
| 24 | |
| 25 | # Start the Node.js application |
| 26 | CMD ["npm", "run", "start"] |