docs: document data volume mount and container profiling
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -33,7 +33,8 @@ Client -------> s5p -------> Hop 1 -------> Hop 2 -------> Target
|
||||
| Local venv | `pip install -e .` then `s5p -c config/s5p.yaml` |
|
||||
| Container | `make build && make up` (Alpine, ~59MB) |
|
||||
|
||||
Container mounts `./src` and `./config/s5p.yaml` read-only at runtime.
|
||||
Container mounts `./src` and `./config/s5p.yaml` read-only, plus
|
||||
`~/.cache/s5p` as `/data` for pool state and profile output.
|
||||
No application code is baked into the image.
|
||||
|
||||
## Dependencies
|
||||
|
||||
@@ -50,7 +50,8 @@ make logs # podman-compose logs -f
|
||||
make down # podman-compose down
|
||||
```
|
||||
|
||||
Source and config are bind-mounted, not baked into the image.
|
||||
Source, config, and data are bind-mounted, not baked into the image.
|
||||
Pool state and profile output persist in `~/.cache/s5p/` (`/data` inside container).
|
||||
|
||||
## Configuration
|
||||
|
||||
|
||||
@@ -26,6 +26,8 @@ make logs # podman-compose logs -f
|
||||
make down # podman-compose down
|
||||
```
|
||||
|
||||
Volumes: `./src` (ro), `./config/s5p.yaml` (ro), `~/.cache/s5p` → `/data` (pool state + profiles)
|
||||
|
||||
## Config
|
||||
|
||||
```bash
|
||||
@@ -92,7 +94,9 @@ curl --max-time 30 -x socks5h://127.0.0.1:1080 https://example.com
|
||||
## Profiling
|
||||
|
||||
```bash
|
||||
# Enable in compose.yaml: uncomment the command line
|
||||
python -m pstats s5p.prof # interactive stats viewer
|
||||
python -m pstats ~/.cache/s5p/s5p.prof # container profile output
|
||||
```
|
||||
|
||||
## Metrics Log
|
||||
|
||||
@@ -84,7 +84,8 @@ make down # stop and remove container
|
||||
```
|
||||
|
||||
Source (`./src`) and config (`./config/s5p.yaml`) are mounted read-only
|
||||
into the container. Edit locally, restart to pick up changes.
|
||||
into the container. `~/.cache/s5p` is mounted as `/data` for pool state
|
||||
and profile output. Edit locally, restart to pick up changes.
|
||||
|
||||
## Proxy Pool
|
||||
|
||||
@@ -281,6 +282,10 @@ s5p --cprofile -c config/s5p.yaml
|
||||
# Custom output file
|
||||
s5p --cprofile output.prof -c config/s5p.yaml
|
||||
|
||||
# Container: uncomment the command line in compose.yaml
|
||||
# command: ["-c", "/app/config/s5p.yaml", "--cprofile", "/data/s5p.prof"]
|
||||
# Profile output persists at ~/.cache/s5p/s5p.prof on the host.
|
||||
|
||||
# Analyze after stopping
|
||||
python -m pstats s5p.prof
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user