Change panel port from 4000 to 20000

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