Refactor port again
Some checks failed
CI / Test (1.22) (push) Failing after -24m17s
CI / Test (1.23) (push) Failing after -24m17s
CI / Build (push) Successful in -26m37s
CI / Lint (push) Successful in -26m23s

This commit is contained in:
Hein
2026-02-04 14:22:12 +02:00
parent 52241190b5
commit 592ed24204
16 changed files with 76 additions and 76 deletions

View File

@@ -43,7 +43,7 @@ This guide explains how to run WhatsHooked using Docker and Docker Compose.
6. **Check server health:**
```bash
curl http://localhost:8025/health
curl http://localhost:8825/health
```
## Docker Commands
@@ -98,7 +98,7 @@ These volumes ensure your data persists across container restarts.
### Port Mapping
By default, the server runs on port 8025. To change the port:
By default, the server runs on port 8825. To change the port:
**Option 1: Update config.json**
@@ -121,7 +121,7 @@ ports:
```yaml
ports:
- "3000:8025" # Access via localhost:3000, server still runs on 8025 internally
- "3000:8825" # Access via localhost:3000, server still runs on 8825 internally
```
### Authentication
@@ -185,7 +185,7 @@ The QR code will be displayed in ASCII art in the terminal along with a browser
**Option 2: View in Browser**
1. Look for the line: `Or open in browser: http://localhost:8025/api/qr/{account_id}`
1. Look for the line: `Or open in browser: http://localhost:8825/api/qr/{account_id}`
2. Open that URL in your web browser to see a larger PNG image
3. Scan the QR code from your browser
@@ -206,37 +206,37 @@ The Docker image includes both the server and CLI binaries in the `/app/bin` dir
List all hooks:
```bash
docker exec whatshooked-server /app/bin/whatshook-cli --server http://localhost:8025 hooks list
docker exec whatshooked-server /app/bin/whatshook-cli --server http://localhost:8825 hooks list
```
Add a new hook:
```bash
docker exec -it whatshooked-server /app/bin/whatshook-cli --server http://localhost:8025 hooks add
docker exec -it whatshooked-server /app/bin/whatshook-cli --server http://localhost:8825 hooks add
```
Remove a hook:
```bash
docker exec whatshooked-server /app/bin/whatshook-cli --server http://localhost:8025 hooks remove <hook_id>
docker exec whatshooked-server /app/bin/whatshook-cli --server http://localhost:8825 hooks remove <hook_id>
```
List WhatsApp accounts:
```bash
docker exec whatshooked-server /app/bin/whatshook-cli --server http://localhost:8025 accounts list
docker exec whatshooked-server /app/bin/whatshook-cli --server http://localhost:8825 accounts list
```
Send a message:
```bash
docker exec -it whatshooked-server /app/bin/whatshook-cli --server http://localhost:8025 send
docker exec -it whatshooked-server /app/bin/whatshook-cli --server http://localhost:8825 send
```
Check server health:
```bash
docker exec whatshooked-server /app/bin/whatshook-cli --server http://localhost:8025 health
docker exec whatshooked-server /app/bin/whatshook-cli --server http://localhost:8825 health
```
### Authentication with CLI
@@ -247,7 +247,7 @@ If your server has authentication enabled, you need to configure it in the CLI:
```bash
docker exec whatshooked-server /app/bin/whatshook-cli \
--server http://localhost:8025 \
--server http://localhost:8825 \
--api-key your-api-key \
hooks list
```
@@ -265,7 +265,7 @@ docker exec whatshooked-server /app/bin/whatshook-cli \
```bash
cat > /app/.whatshooked-cli.json <<EOF
{
"server_url": "http://localhost:8025",
"server_url": "http://localhost:8825",
"api_key": "your-api-key"
}
EOF
@@ -281,7 +281,7 @@ docker exec whatshooked-server /app/bin/whatshook-cli \
Create an alias on your host machine for easier CLI access:
```bash
alias whatshook-cli='docker exec -it whatshooked-server /app/bin/whatshook-cli --server http://localhost:8025'
alias whatshook-cli='docker exec -it whatshooked-server /app/bin/whatshook-cli --server http://localhost:8825'
```
Then use it like:
@@ -388,7 +388,7 @@ services:
- whatshooked-net
# Don't expose ports to host, only to network
# ports:
# - "8025:8025"
# - "8825:8825"
networks:
whatshooked-net:
@@ -406,7 +406,7 @@ server {
ssl_certificate_key /path/to/key.pem;
location / {
proxy_pass http://whatshooked:8025;
proxy_pass http://whatshooked:8825;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}