deploy: copy static files during build stage
Pedro Lucas Porcellis porcellis@eletrotupi.com · 4 months ago
150a90ad667c31c7374ad5e775cc5343adb934a4 Browse filesParents
1270eeeChanged files
1
Additions
+2
Deletions
0
api/Dockerfile.production
1 1
# Build stage
2 2
FROM node:24-alpine3.23 AS builder
3 3
4 4
RUN apk add --no-cache build-base yaml-dev
5 5
20 20
COPY --chown=${UID}:${GID} . .
21 21
22 22
# Compile TS and spit on dist/
23 23
RUN npm run build
24 24
25 +
RUN cp -r src/static dist/static
26 +
25 27
# Runtime stage
26 28
FROM node:24-alpine3.23
27 29
28 30
RUN apk add --no-cache bash postgresql17-client valkey-cli yaml-dev
29 31
47 49
48 50
EXPOSE 3000
49 51
50 52
# migrate then start
51 53
CMD ["sh", "-c", "npx prisma migrate deploy && npm run prod"]