Skip to content
Snippets Groups Projects
Commit 786f06d1 authored by Esko Ikkala's avatar Esko Ikkala
Browse files

Dockerize

parent ccc18d31
No related branches found
No related tags found
No related merge requests found
node_modules
npm-debug.log
FROM node:10.4-alpine
RUN mkdir /opt/hipla-full-stack && chown node:node /opt/hipla-full-stack
# Create app directory
WORKDIR /opt/hipla-full-stack
USER node
# Install app dependencies
# A wildcard is used to ensure both package.json AND package-lock.json are copied
# where available (npm@5+)
COPY package*.json ./
COPY webpack*.js ./
# Bundle app source
COPY src ./src
RUN npm install && npm run build
EXPOSE 3001
CMD ["node", "dist/server"]
# Hipla.fi
## Build
`docker build -t hipla-full-stack .`
## Run
`docker run -d -p 3005:3001 --name hipla hipla-full-stack`
## Upgrade
```
docker build -t hipla-full-stack .
docker stop hipla
docker rm hipla
docker run -d -p 3005:3001 --name hipla hipla-full-stack
```
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment