Created
February 26, 2021 10:43
-
-
Save romch007/2ecdb73140d4af9d157369babc4280b8 to your computer and use it in GitHub Desktop.
AdonisJS v5 Dockerfile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM node:lts-alpine AS builder | |
WORKDIR /builder | |
COPY package.json yarn.lock ./ | |
RUN apk update && apk add git | |
RUN yarn install --frozen-lockfile | |
COPY . . | |
RUN node ace build --prod --client yarn | |
FROM node:lts-alpine | |
ENV NODE_ENV=production | |
ENV PORT=80 | |
ENV HOST=0.0.0.0 | |
WORKDIR /app | |
RUN apk update && apk add git | |
COPY --from=builder /builder/build/package.json /builder/build/yarn.lock ./ | |
RUN yarn install --production --frozen-lockfile | |
COPY --from=builder /builder/build /app | |
CMD ["node", "server.js"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment