Last active
March 23, 2021 14:33
-
-
Save Gomah/876f15355a636ad105e36d5a41bfd366 to your computer and use it in GitHub Desktop.
Nuxt.js Dockerfile :: Now.sh
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:10-alpine | |
# Create app directory | |
RUN mkdir -p /usr/src/app | |
WORKDIR /usr/src/app | |
# Install app dependencies | |
COPY package.json /usr/src/app/ | |
COPY yarn.lock /usr/src/app/ | |
RUN yarn install | |
# Set environment variables | |
ENV NODE_ENV production | |
ENV NUXT_HOST 0.0.0.0 | |
ENV NUXT_PORT 3000 | |
# Bundle app source | |
COPY . /usr/src/app | |
RUN yarn build | |
# Clear the cache | |
RUN yarn cache clean | |
EXPOSE 3000 | |
CMD [ "yarn", "start" ] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
sure, but there are known work arounds