at main 569 B view raw
1#Had problems with pnpm and sqlite, so just using npm. bit longer but gets the job done. 2 3FROM node:24-slim AS builder 4WORKDIR /app 5 6COPY package.json ./ 7RUN npm install 8 9COPY . . 10#Needs a place holder during build 11ENV DATABASE_URL="placeholder" 12RUN npm run build 13 14FROM node:24-alpine3.22 AS web-app 15WORKDIR /app 16 17COPY --from=builder /app/build /app/dist 18COPY --from=builder /app/package.json /app/ 19COPY ./drizzle /app/drizzle 20ENV MIGRATIONS_FOLDER="/app/drizzle" 21 22RUN npm install --prod 23 24#This is saying run what's in the dist folder 25CMD ["node", "/app/dist/index.js"]