Add Node debugging
and simplify Compose file
This commit is contained in:
parent
64839f70dc
commit
df96dfd638
@ -2,53 +2,27 @@ version: "2"
|
|||||||
|
|
||||||
services:
|
services:
|
||||||
voting-app:
|
voting-app:
|
||||||
build: ./voting-app/.
|
build: ./voting-app
|
||||||
volumes:
|
volumes:
|
||||||
- ./voting-app:/app
|
- ./voting-app:/app
|
||||||
ports:
|
ports:
|
||||||
- "5000:80"
|
- "5000:80"
|
||||||
links:
|
|
||||||
- redis
|
|
||||||
networks:
|
|
||||||
- front-tier
|
|
||||||
- back-tier
|
|
||||||
|
|
||||||
result-app:
|
|
||||||
build: ./result-app/.
|
|
||||||
volumes:
|
|
||||||
- ./result-app:/app
|
|
||||||
ports:
|
|
||||||
- "5001:80"
|
|
||||||
links:
|
|
||||||
- db
|
|
||||||
networks:
|
|
||||||
- front-tier
|
|
||||||
- back-tier
|
|
||||||
|
|
||||||
worker:
|
|
||||||
build: ./worker
|
|
||||||
links:
|
|
||||||
- db
|
|
||||||
- redis
|
|
||||||
networks:
|
|
||||||
- back-tier
|
|
||||||
|
|
||||||
redis:
|
redis:
|
||||||
image: redis:alpine
|
image: redis:alpine
|
||||||
ports: ["6379"]
|
ports: ["6379"]
|
||||||
networks:
|
|
||||||
- back-tier
|
worker:
|
||||||
|
build: ./worker
|
||||||
|
|
||||||
db:
|
db:
|
||||||
image: postgres:9.4
|
image: postgres:9.4
|
||||||
volumes:
|
|
||||||
- "db-data:/var/lib/postgresql/data"
|
|
||||||
networks:
|
|
||||||
- back-tier
|
|
||||||
|
|
||||||
|
result-app:
|
||||||
|
build: ./result-app
|
||||||
|
command: nodemon --debug server.js
|
||||||
volumes:
|
volumes:
|
||||||
db-data:
|
- ./result-app:/app
|
||||||
|
ports:
|
||||||
networks:
|
- "5001:80"
|
||||||
front-tier:
|
- "5858:5858"
|
||||||
back-tier:
|
|
||||||
|
18
result-app/.vscode/launch.json
vendored
Normal file
18
result-app/.vscode/launch.json
vendored
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
{
|
||||||
|
"version": "0.2.0",
|
||||||
|
"configurations": [
|
||||||
|
{
|
||||||
|
"name": "Attach",
|
||||||
|
"type": "node",
|
||||||
|
"request": "attach",
|
||||||
|
"port": 5858,
|
||||||
|
"address": "localhost",
|
||||||
|
"restart": true,
|
||||||
|
"sourceMaps": false,
|
||||||
|
"outDir": null,
|
||||||
|
"localRoot": "${workspaceRoot}",
|
||||||
|
"remoteRoot": "/app",
|
||||||
|
"timeout": 10000
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
@ -2,6 +2,7 @@ FROM node:5.11.0-slim
|
|||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
|
RUN npm install -g nodemon
|
||||||
ADD package.json /app/package.json
|
ADD package.json /app/package.json
|
||||||
RUN npm config set registry http://registry.npmjs.org
|
RUN npm config set registry http://registry.npmjs.org
|
||||||
RUN npm install && npm ls
|
RUN npm install && npm ls
|
||||||
|
Loading…
Reference in New Issue
Block a user