2022-05-22 16:51:25 +00:00
|
|
|
# Dockerfile
|
2022-06-22 14:17:57 +00:00
|
|
|
FROM node:18-alpine
|
2022-01-01 22:34:58 +00:00
|
|
|
|
2022-05-22 16:51:25 +00:00
|
|
|
# create destination directory
|
|
|
|
RUN mkdir -p /usr/src/nuxt-app
|
|
|
|
WORKDIR /usr/src/nuxt-app
|
2022-01-01 22:34:58 +00:00
|
|
|
|
2022-05-22 16:51:25 +00:00
|
|
|
# update and install dependency
|
|
|
|
RUN apk update && apk upgrade
|
|
|
|
RUN apk add git
|
2022-01-01 22:34:58 +00:00
|
|
|
|
2022-05-22 16:51:25 +00:00
|
|
|
# copy the app, note .dockerignore
|
|
|
|
COPY . /usr/src/nuxt-app/
|
|
|
|
RUN yarn install
|
|
|
|
RUN yarn build
|
2022-01-01 22:34:58 +00:00
|
|
|
|
|
|
|
EXPOSE 3000
|
|
|
|
|
2022-05-22 16:51:25 +00:00
|
|
|
ENV NUXT_HOST=0.0.0.0
|
|
|
|
ENV NUXT_PORT=3000
|
2022-01-01 22:34:58 +00:00
|
|
|
|
2022-05-22 16:51:25 +00:00
|
|
|
CMD [ "yarn", "start" ]
|