Skip to content

Commit

Permalink
Added Dockerfile for the router
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrielhamel committed Jan 30, 2020
1 parent 5171be8 commit 83174c4
Show file tree
Hide file tree
Showing 12 changed files with 19 additions and 3 deletions.
11 changes: 10 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,13 @@ services:
game_server:
build: server
ports:
- "3000:8080"
- "3000:3000"

router:
build: webserver/router
depends_on:
- game_server
ports:
- "3001:3001"
links:
- game_server
2 changes: 1 addition & 1 deletion server/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ WORKDIR /usr/src/zappy
COPY . server/
COPY Makefile .
RUN make zappy_server
CMD ["./zappy_server", "-p", "8080", "-x", "30", "-y", "30", "-n", "team1", "team2", "-c", "2", "-f", "1"]
CMD ["./zappy_server", "-p", "3000", "-x", "30", "-y", "30", "-n", "team1", "team2", "-c", "2", "-f", "1"]
7 changes: 7 additions & 0 deletions webserver/router/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
FROM node:13.7.0-alpine3.10
WORKDIR /usr/src/router
COPY . .
RUN npm i
RUN npm i typescript@3.4.5 -g
RUN tsc
CMD ["npm", "run-script", "start"]
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion webserver/package.json → webserver/router/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "1.0.0",
"main": "build/index.js",
"scripts": {
"start": "node build/index.js 4242 8080"
"start": "node build/index.js 3001 3000"
},
"author": "",
"license": "ISC",
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 83174c4

Please sign in to comment.