Skip to content

Commit

Permalink
Merge pull request #18 from jonigl/docker
Browse files Browse the repository at this point in the history
Docker
  • Loading branch information
jonigl authored Nov 19, 2018
2 parents 4fb4045 + 7591af3 commit b00423b
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
.git
15 changes: 15 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#sudo docker build -t tacs-frontend:1.0.0 .
#docker run -d -p 8080:80 tacs-frontend:1.0.0

FROM node:10-alpine AS builder
WORKDIR /build
COPY package.json .
RUN npm install
COPY angular.json .
COPY tsconfig.json .
COPY src src
#RUN apk add --no-cache bash
RUN npm run-script ng -- build --prod

FROM nginx:1.10-alpine
COPY --from=builder /build/dist/tacs-frontend /usr/share/nginx/html
7 changes: 7 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#docker-compose up
version: '3.7'
services:
frontend:
image: "jonigl/tacs-grupo1-frontend:1.0.0"
ports:
- "8080:80"
2 changes: 1 addition & 1 deletion src/environments/environment.prod.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export const environment = {
production: true,
apiUrl: 'https://tacs-grupo1.herokuapp.com/api/v1'
apiUrl: '/api/v1'
};
2 changes: 1 addition & 1 deletion src/environments/environment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

export const environment = {
production: false,
apiUrl: 'http://localhost:8080/api/v1'
apiUrl: '/api/v1'
};

/*
Expand Down

0 comments on commit b00423b

Please sign in to comment.