Files
hotelsync/deploy/ssl.sh
HotelSync 420d55d57e Initial commit: HotelSync PMS v0.1.0
- React 18 + TypeScript + Vite + Tailwind CSS
- Шахматка бронирований (drag-to-book)
- Страницы: Calendar, Bookings, Rooms, Housekeeping, Channels, API Docs, Settings
- Роли: super_admin, hotel_manager, housekeeper
- Светлая/тёмная тема
- Docker + Nginx конфигурация
- Лендинг hotelsync.ru
2026-03-10 20:38:32 +03:00

32 lines
1.1 KiB
Bash
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.
#!/bin/bash
# Получение SSL сертификатов Let's Encrypt
set -e
EMAIL="admin@hotelsync.ru"
DOMAINS="hotelsync.ru,www.hotelsync.ru,app.hotelsync.ru,api.hotelsync.ru,git.hotelsync.ru"
echo "→ Получение SSL сертификатов..."
# Временный nginx для certbot challenge
docker run --rm -p 80:80 -v /opt/hotelsync/certbot/www:/var/www/certbot nginx:alpine &
NGINX_PID=$!
sleep 2
for domain in hotelsync.ru app.hotelsync.ru api.hotelsync.ru git.hotelsync.ru; do
docker run --rm \
-v /opt/hotelsync/certbot/certs:/etc/letsencrypt \
-v /opt/hotelsync/certbot/www:/var/www/certbot \
certbot/certbot certonly \
--webroot \
--webroot-path=/var/www/certbot \
--email "$EMAIL" \
--agree-tos \
--no-eff-email \
-d "$domain" \
$([ "$domain" = "hotelsync.ru" ] && echo "-d www.hotelsync.ru" || echo "")
echo "✓ SSL для $domain получен"
done
kill $NGINX_PID 2>/dev/null || true
echo "✅ Все SSL сертификаты получены"