mirror of
https://github.com/Instadapp/assembly.git
synced 2024-07-29 22:37:06 +00:00
30 lines
485 B
Docker
30 lines
485 B
Docker
|
# -------------> The build Image
|
||
|
FROM node:14 AS build
|
||
|
|
||
|
# Create app directory
|
||
|
WORKDIR /usr/src/app
|
||
|
|
||
|
# Install app dependencies
|
||
|
COPY package.json ./
|
||
|
COPY yarn.lock ./
|
||
|
|
||
|
RUN yarn install --frozen-lockfile
|
||
|
|
||
|
# Bundle app source
|
||
|
COPY . .
|
||
|
|
||
|
RUN npx nuxt build
|
||
|
|
||
|
RUN npx nuxt generate
|
||
|
|
||
|
RUN yarn install --frozen-lockfile --production
|
||
|
|
||
|
# ---------------> The Production Image
|
||
|
FROM node:14-alpine
|
||
|
|
||
|
WORKDIR /usr/src/app
|
||
|
|
||
|
COPY --from=build /usr/src/app /usr/src/app
|
||
|
|
||
|
CMD [ "npx", "nuxt", "start" ]
|