mirror of
https://github.com/lukevella/rallly.git
synced 2025-08-02 16:09:08 +02:00
This is required for a successful startup, so this makes it the default command rather than requiring it to be overridden in the compose file. Co-authored-by: Luke Vella <me@lukevella.com>
27 lines
No EOL
386 B
Docker
27 lines
No EOL
386 B
Docker
FROM node:alpine as build
|
|
|
|
WORKDIR /app
|
|
|
|
COPY package.json .
|
|
COPY yarn.lock .
|
|
COPY prisma/schema.prisma .
|
|
|
|
RUN yarn --frozen-lockfile
|
|
|
|
COPY . .
|
|
|
|
RUN yarn build
|
|
|
|
FROM node:alpine
|
|
|
|
ENV PORT 3000
|
|
EXPOSE 3000
|
|
|
|
ARG DATABASE_URL
|
|
ENV DATABASE_URL $DATABASE_URL
|
|
|
|
WORKDIR /usr/src/app
|
|
|
|
COPY --from=build /app .
|
|
|
|
CMD sh -c "yarn prisma migrate deploy --schema prisma/schema.prisma && yarn start" |