-
Notifications
You must be signed in to change notification settings - Fork 0
fix: memory leak in libp2p bootstrap node #13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
5188296
4d24826
0eb61ea
a9f7554
f762208
fb6ddb7
18c6161
53bcdb5
d0311b1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -16,6 +16,6 @@ bin/ | |
| # Environment files | ||
| .env | ||
| .env.* | ||
|
|
||
| .DS_Store | ||
| # XML files (repomix output) | ||
| *.xml | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| FROM golang:1.24.5-alpine AS builder | ||
| FROM golang:1.25-alpine AS builder | ||
|
|
||
| WORKDIR /app | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,14 @@ | ||
| #!/bin/bash | ||
|
|
||
| # Detect docker compose command (docker compose plugin vs docker-compose standalone) | ||
| if docker compose version >/dev/null 2>&1; then | ||
| DOCKER_COMPOSE="docker compose" | ||
| elif docker-compose version >/dev/null 2>&1; then | ||
| DOCKER_COMPOSE="docker-compose" | ||
| else | ||
| echo "Error: Neither 'docker compose' nor 'docker-compose' found. Please install Docker Compose." | ||
| exit 1 | ||
| fi | ||
|
|
||
| # Build the Docker image using docker-compose | ||
| docker-compose build | ||
| $DOCKER_COMPOSE build |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,12 +1,11 @@ | ||
| version: '3.8' | ||
|
|
||
| services: | ||
| bootstrap-node: | ||
| build: | ||
| context: . | ||
| dockerfile: Dockerfile | ||
| ports: | ||
| - "${BOOTSTRAP_PORT:-4001}:${BOOTSTRAP_PORT:-4001}" | ||
| - "${PPROF_PORT:-6060}:${PPROF_PORT:-6060}" | ||
| env_file: | ||
| - ./.env | ||
| restart: unless-stopped | ||
|
|
@@ -17,3 +16,10 @@ services: | |
| environment: | ||
| - LOG_FILE=/app/logs/bootstrap-node.log | ||
| - LOG_LEVEL=${LOG_LEVEL:-info} | ||
| - PPROF_PORT=${PPROF_PORT:-6060} | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
In the Docker Compose path, the README says Useful? React with 👍 / 👎. |
||
| logging: | ||
| driver: "json-file" | ||
| options: | ||
| max-size: "10m" | ||
| max-file: "5" | ||
| compress: "true" | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Setting
PPROF_PORT=${PPROF_PORT:-6060}makesPPROF_PORTnon-empty even when operators do not set it, because Compose:-interpolation injects the default when the variable is unset/empty. Sincecmd/main.gostarts pprof wheneverPPROF_PORTis non-empty, this change enables and publishes the debug profiler by default, exposing runtime profiling endpoints in environments that expected pprof to stay opt-in.Useful? React with 👍 / 👎.