Changed the way that the migration get's triggered

This commit is contained in:
2021-08-14 13:09:25 +02:00
parent 512acc0b8c
commit 8fa489f2bc
2 changed files with 2 additions and 8 deletions

View File

@@ -6,6 +6,7 @@ RUN yarn --production --frozen-lockfile
COPY migrations ./migrations
COPY src/server.js ./
COPY knexfile.js ./
RUN mkdir db
#
# FROM astefanutti/scratch-node:16.0.0
FROM node:16.6.2-alpine3.14
@@ -13,4 +14,4 @@ WORKDIR /app
COPY --from=0 /app /app
ENV NODE_ENV production
EXPOSE 3000
ENTRYPOINT ["node", "./server.js"]
ENTRYPOINT ["/bin/sh", "-c", "yarn migrate && node ./server.js"]