Skip to content

Commit

Permalink
Update Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
PatrickMohr authored Jan 23, 2024
1 parent c4e61db commit 57aa7b0
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
FROM node:lts-alpine
# Dockerfile
FROM node:11.13.0-alpine

# install simple http server for serving static content
RUN npm install -g http-server
# create destination directory
RUN mkdir -p /usr/src/nuxt-app
WORKDIR /usr/src/nuxt-app

# make the 'app' folder the current working directory
WORKDIR /app
# update and install dependency
RUN apk update && apk upgrade
RUN apk add git

# copy both 'package.json' and 'package-lock.json' (if available)
COPY package*.json ./

# install project dependencies
# copy the app, note .dockerignore
COPY . /usr/src/nuxt-app/
RUN npm install
RUN npm run build

# copy project files and folders to the current working directory (i.e. 'app' folder)
COPY . .
EXPOSE 3000

# build app for production with minification
RUN npm run build
ENV NUXT_HOST=0.0.0.0
ENV NUXT_PORT=3000

EXPOSE 8080
CMD [ "http-server", "dist" ]
CMD [ "npm", "start" ]

0 comments on commit 57aa7b0

Please sign in to comment.