security: bind Docker to localhost only (127.0.0.1)

This commit is contained in:
Nicolas Pastorello committed 2026-07-06 18:31:34 -03:00
1 parent a92baca134
commit aaf2b7fe60
2 files changed
+5 -3

No files matched your search

+3 -1
View File
@@ -98,7 +98,7 @@ Library/SDK usage, the full HTTP API, and MCP setup live in [docs/](docs/).
### Docker ### Docker
Run T3MP3ST API server in a container: Run T3MP3ST API server in a container (localhost only, not exposed externally):
```bash ```bash
cp .env.example .env # configure API keys cp .env.example .env # configure API keys
@@ -106,6 +106,8 @@ docker compose up -d # API → http://localhost:3333
docker compose logs -f # view logs docker compose logs -f # view logs
``` ```
**Security Note:** Container binds to `127.0.0.1:3333` - accessible only from localhost, not exposed to network.
Test the API: Test the API:
```bash ```bash
curl http://localhost:3333/api/health curl http://localhost:3333/api/health
+2 -2
View File
@@ -8,13 +8,13 @@ services:
env_file: env_file:
- .env - .env
environment: environment:
- T3MP3ST_HOST=0.0.0.0 - T3MP3ST_HOST=127.0.0.1
- T3MP3ST_PORT=3333 - T3MP3ST_PORT=3333
volumes: volumes:
- ./reports:/app/reports - ./reports:/app/reports
- ./evidence:/app/evidence - ./evidence:/app/evidence
ports: ports:
- "3333:3333" - "127.0.0.1:3333:3333"
healthcheck: healthcheck:
test: ["CMD", "node", "-e", "process.exit(0)"] test: ["CMD", "node", "-e", "process.exit(0)"]
interval: 30s interval: 30s