Skip to content

Commit 5ce71b1

Browse files
authored
Merge pull request #4 from MichaelTsengLZ/miczeng/addDebug
Debug docker-compose service and crawler
2 parents a2769a1 + cd3692e commit 5ce71b1

File tree

2 files changed

+20
-1
lines changed

2 files changed

+20
-1
lines changed

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,15 @@ If you want to work with curation on GitHub, you could follow these steps
166166
3. Then you could create a webhook in your forked curate-data repository. Use `<ngork forwarding url(prefer https one)>/webhook` as the webhook payload URL. And put 'secret' as the webhook secret.
167167
4. You could verify Github webhook events with `ngork` management UI, http://localhost:4040
168168

169+
## Debug
170+
After running `docker-compose up`, you could attach debuggers to the running containers for service and crawler.
171+
172+
### Debug service
173+
Open the folder to the local clone of [crawler](https://github.com/clearlydefined/crawler) with vscode. Choose `Docker: Attach to Node` and run debug.
174+
175+
### Debug Crawler
176+
Open the folder to the local clone of [service](https://github.com/clearlydefined/service) with vscode. Choose `Attach to Docker` and run debug.
177+
169178
## What You're Running
170179

171180
Now, let's go through what your are running, container by container.

docker-compose.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ services:
77
build:
88
context: ./website
99
dockerfile: DevDockerfile
10-
ports:
10+
ports:
1111
- "3000:3000"
1212
stdin_open: true
1313
service:
@@ -16,7 +16,12 @@ services:
1616
dockerfile: DevDockerfile
1717
ports:
1818
- "4000:4000"
19+
- "9230:9229"
1920
env_file: .env
21+
entrypoint:
22+
- "node"
23+
- "--inspect=0.0.0.0:9229"
24+
- "./bin/www"
2025
volumes:
2126
- ./harvested_data:/tmp/harvested_data/
2227
links:
@@ -31,6 +36,11 @@ services:
3136
- ./harvested_data:/tmp/harvested_data/
3237
ports:
3338
- "5000:5000"
39+
- "9229:9229"
40+
entrypoint:
41+
- "node"
42+
- "--inspect=0.0.0.0:9229"
43+
- "./index.js"
3444
clearlydefined_mongo_db:
3545
image: "mongo:latest"
3646
ports:

0 commit comments

Comments
 (0)