Change panel port from 8000 to 4000

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-07-25 21:13:26 +03:00
co-authored by Cursor
parent 85a2800870
commit 35d3a3b888
3 changed files with 9 additions and 9 deletions
+2 -2
View File
@@ -20,7 +20,7 @@ COPY scripts ./scripts
RUN sed -i 's/\r$//' /app/scripts/entrypoint.sh && chmod +x /app/scripts/entrypoint.sh
EXPOSE 8000
EXPOSE 4000
ENTRYPOINT ["/app/scripts/entrypoint.sh"]
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000"]
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "4000"]
+3 -3
View File
@@ -37,12 +37,12 @@ PUBLIC_HOST=ваш-домен-или-ip
POSTGRES_PASSWORD=надежный-пароль-бд
```
4. Deploy. Панель: порт `8000` (или домен через Traefik в Dokploy).
4. Deploy. Панель: порт `4000` (или домен через Traefik в Dokploy).
5. Вход: `/admin/login`
### Если Bad Gateway (502)
1. В Dokploy Domain укажите сервис **`panel`**, порт **`8000`** (не `postgres`).
1. В Dokploy Domain укажите сервис **`panel`**, порт **`4000`** (не `postgres`).
2. Откройте логи сервиса `panel` — должны быть строки `Database is ready` и `Starting uvicorn`.
3. Ошибка `Name or service not known` значит `panel` не видит хост БД:
- `panel` и `postgres` связаны через внутреннюю сеть `vpn_internal`;
@@ -63,7 +63,7 @@ docker compose ps
docker compose logs -f panel
```
Откройте http://localhost:8000
Откройте http://localhost:4000
## Как связаны VPN‑демоны
+4 -4
View File
@@ -1,5 +1,5 @@
services:
# Domain in Dokploy → service `panel`, port `8000`
# Domain in Dokploy → service `panel`, port `4000`
panel:
build:
context: .
@@ -9,9 +9,9 @@ services:
postgres:
condition: service_healthy
expose:
- "8000"
- "4000"
ports:
- "${PANEL_PORT:-8000}:8000"
- "${PANEL_PORT:-4000}:4000"
environment:
APP_NAME: ${APP_NAME:-VpnPanel}
SECRET_KEY: ${SECRET_KEY:-change-me-to-a-long-random-string}
@@ -48,7 +48,7 @@ services:
- vpn_internal
- dokploy-network
healthcheck:
test: ["CMD", "curl", "-f", "http://127.0.0.1:8000/health"]
test: ["CMD", "curl", "-f", "http://127.0.0.1:4000/health"]
interval: 15s
timeout: 5s
retries: 10