diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..41ed062 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,22 @@ +FROM node:8.4 + +ENV HOME=/home/app +WORKDIR $HOME + +COPY package.json package.json +COPY package-lock.json package-lock.json + +RUN npm install + +COPY tsconfig.json tsconfig.json +COPY tslint.json tslint.json +COPY protractor.conf.js protractor.conf.js +COPY karma.conf.js karma.conf.js +COPY .angular-cli.json .angular-cli.json + +COPY e2e e2e +COPY src src + +EXPOSE 4200:4200 + +ENTRYPOINT ["npm", "start", "--"] diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..91b331a --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,7 @@ +version: "3.3" +services: + angular-frontend: + build: . + container_name: angular-frontend + ports: + - "4200:4200" diff --git a/karma.conf.js b/karma.conf.js index 8893c95..7cbbd87 100644 --- a/karma.conf.js +++ b/karma.conf.js @@ -22,6 +22,7 @@ module.exports = function (config) { angularCli: { environment: 'dev' }, + exclude: ['docker-compose.yml', 'Dockerfile'], reporters: ['progress', 'kjhtml'], port: 9876, colors: true, diff --git a/package.json b/package.json index da614f6..d774c09 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "license": "MIT", "scripts": { "ng": "ng", - "start": "ng serve", + "start": "ng serve --host=0.0.0.0 --port=4200", "build": "ng build", "test": "ng test --code-cover", "lint": "ng lint",