Skip to content

Commit

Permalink
Docker related changes
Browse files Browse the repository at this point in the history
  • Loading branch information
shalithasuranga committed Jul 12, 2019
1 parent 9349f08 commit bd7a71d
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 15 deletions.
3 changes: 2 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
node_modules
client/node_modules
server/node_modules
10 changes: 7 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,15 @@ RUN mkdir -p /usr/src/app

WORKDIR /usr/src/app

COPY package.json /usr/src/app
COPY . /usr/src/app

RUN npm install
WORKDIR /usr/src/app/client

COPY . /usr/src/app
RUN npm install && npm run build

WORKDIR /usr/src/app/server

RUN npm install

EXPOSE 3003

Expand Down
13 changes: 3 additions & 10 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,10 @@
version: '2'

services:
angular:
build: client
server:
build: .
ports:
- "4200:4200"
environment:
- NODE_ENV=dev

express:
build: server
ports:
- "5000:5000"
- "80:3003"
links:
- database

Expand Down
2 changes: 1 addition & 1 deletion server/.env
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
MONGO_STR=mongodb://localhost/walk2win
MONGO_STR=mongodb://database/walk2win
PORT=3003

0 comments on commit bd7a71d

Please sign in to comment.