Skip to content

Commit aa6e059

Browse files
committed
fix docker file for api to copy important scripts/files
1 parent 30ebcbe commit aa6e059

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

apps/api/Dockerfile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ COPY --from=builder $DIR/out/json/ .
1919
COPY --from=builder $DIR/out/yarn.lock ./yarn.lock
2020
COPY --from=builder $DIR/turbo.json ./turbo.json
2121
COPY --from=builder $DIR/packages ./packages
22+
COPY --from=builder $DIR/apps/api/prisma ./prisma
2223
RUN yarn install --ignore-scripts --frozen-lockfile --network-timeout 600000
2324

2425
# Running build using turbo
@@ -39,8 +40,12 @@ ARG DIR=/usr/src/app
3940
ENV NODE_ENV production
4041
WORKDIR $DIR
4142
RUN apk add --no-cache dumb-init=1.2.5-r3
43+
COPY --chown=node:node --from=sourcer $DIR/apps/api/package.json ./package.json
4244
COPY --chown=node:node --from=sourcer $DIR/apps/api/dist ./dist
4345
COPY --chown=node:node --from=sourcer $DIR/node_modules $DIR/node_modules
46+
COPY --chown=node:node --from=sourcer $DIR/prisma ./prisma
47+
COPY --chown=node:node --from=sourcer $DIR/apps/api/migrate.sh ./migrate.sh
48+
COPY --chown=node:node --from=sourcer $DIR/apps/api/ensureDb.js ./ensureDb.js
4449
ENTRYPOINT ["/usr/bin/dumb-init", "--"]
4550
CMD ["node", "dist/main.js"]
4651
EXPOSE 3000

0 commit comments

Comments
 (0)