20 lines
481 B
Docker
20 lines
481 B
Docker
# Same packages as local. binaryTargets in schema.prisma include linux-musl-openssl-3.0.x for Docker.
|
|
FROM node:20-alpine
|
|
|
|
WORKDIR /app
|
|
|
|
COPY package*.json ./
|
|
RUN npm install
|
|
|
|
COPY . .
|
|
|
|
RUN npx prisma generate
|
|
|
|
# Entrypoint used when running with bind mount (live code); lives outside /app so mount does not override it.
|
|
COPY scripts/docker-dev-entrypoint.sh /entrypoint.sh
|
|
RUN sed -i 's/\r$//' /entrypoint.sh && chmod +x /entrypoint.sh
|
|
|
|
EXPOSE 4000
|
|
|
|
ENTRYPOINT ["/entrypoint.sh"]
|