Skip to content

Commit 87b562e

Browse files
added dockerfile
1 parent e000e54 commit 87b562e

2 files changed

Lines changed: 29 additions & 0 deletions

File tree

.dockerignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
node_modules/
2+
npm-debug.log
3+
Dockerfile
4+
package-lock.json
5+
yarn.lock

Dockerfile

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
FROM node:8-alpine
2+
LABEL Description="This image is used to start the hc-frontend-nuxt" Vendor="Grzegorz Leoniec" Version="1.0" Maintainer="Grzegorz Leoniec ([email protected])"
3+
4+
# update unix packages
5+
RUN apk update && apk upgrade
6+
RUN rm -rf /var/cache/apk/*
7+
8+
# copy the project
9+
RUN mkdir -p /var/www/
10+
COPY . /var/www/
11+
WORKDIR /var/www/
12+
13+
# expose the app port
14+
EXPOSE 8080
15+
16+
# set environment variables
17+
# ENV NPM_CONFIG_PRODUCTION=false
18+
ENV HOST=0.0.0.0
19+
ENV NODE_ENV=production
20+
21+
# buld application
22+
RUN npm install --production
23+
24+
CMD [ "node", "server/index.js" ]

0 commit comments

Comments
 (0)