Skip to content

Commit

Permalink
add local docker compose debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
hacktobeer committed Nov 1, 2024
1 parent a019212 commit 249b1ee
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 3 deletions.
36 changes: 33 additions & 3 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,37 @@
"version": "0.2.0",
"configurations": [
{
"name": "Attach to Worker",
"name": "Attach debugpy Worker",
"type": "debugpy",
"request": "attach",
"connect": {
"host": "localhost",
"port":10000
},
"pathMappings": [
{
"localRoot": "${workspaceFolder}",
"remoteRoot": "/home/turbinia"
}
]
},
{
"name": "Attach debugpy Server",
"type": "debugpy",
"request": "attach",
"connect": {
"host": "localhost",
"port":20000
},
"pathMappings": [
{
"localRoot": "${workspaceFolder}",
"remoteRoot": "/home/turbinia"
}
]
},
{
"name": "Attach k8s Worker",
"type": "cloudcode.kubernetes",
"request": "attach",
"language": "Python",
Expand All @@ -14,7 +44,7 @@
"remoteRoot": "/home/turbinia"
},
{
"name": "Attach to Server",
"name": "Attach k8s Server",
"type": "cloudcode.kubernetes",
"request": "attach",
"language": "Python",
Expand All @@ -26,7 +56,7 @@
"remoteRoot": "/home/turbinia"
},
{
"name": "Attach to API Server",
"name": "Attach k8s API Server",
"type": "cloudcode.kubernetes",
"request": "attach",
"language": "Python",
Expand Down
6 changes: 6 additions & 0 deletions docker/local/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ services:
- LC_ALL=C.UTF-8
- LANG=C.UTF-8
- TURBINIA_EXTRA_ARGS=${TURBINIA_EXTRA_ARGS}
ports:
- 20000:20000

turbinia-api-server:
#image: "turbinia-api-server-dev" # Use this for local development and comment out below line
Expand All @@ -41,6 +43,8 @@ services:
- TURBINIA_EXTRA_ARGS=${TURBINIA_EXTRA_ARGS}
expose:
- "8000"
ports:
- 30000:30000

turbinia-worker:
#image: "turbinia-worker-dev" # Use this for local development and comment out below line
Expand All @@ -56,6 +60,8 @@ services:
- LC_ALL=C.UTF-8
- LANG=C.UTF-8
- TURBINIA_EXTRA_ARGS=${TURBINIA_EXTRA_ARGS}
ports:
- 10000:10000

# Uncomment below in case you want to run a second worker on the same host.
# turbinia-worker2:
Expand Down
3 changes: 3 additions & 0 deletions docker/worker/Dockerfile.dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,6 @@ charts
__pycache__
.cache
turbinia.egg-info
conf/
redis-data/
evidence/

0 comments on commit 249b1ee

Please sign in to comment.