Files

38 lines
757 B
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Caddy + SSL для Mini App
Путь на сервере: `/opt/bot`
## Перед запуском
1. DNS: `bot.example.com` → IP сервера
2. Свободны порты **80** и **443** (если заняты другим Caddy/nginx — останови их или используй другой сервер)
3. В `.env`:
```env
WEBAPP_URL=https://bot.example.com
WEBAPP_DOMAIN=bot.example.com
```
## Запуск
```bash
cd /opt/bot
docker compose up -d --build
docker compose ps
docker compose logs -f caddy
```
## Проверка
```bash
curl -sS https://bot.example.com/api/health
# {"ok": true}
```
## Если 80/443 заняты
```bash
ss -tlnp | grep -E ':80|:443'
docker ps --format 'table {{.Names}}\t{{.Ports}}'
```