mirror of
https://github.com/dograh-hq/dograh.git
synced 2026-06-16 08:25:18 +02:00
fix: fix remote deployment method (#145)
* fix: disable file logging for docker compose mode * fix: wait for processes in Docker compose mode * fix: add default turn server conf for remote mode * remove sentence transformers * make turn detection configurable
This commit is contained in:
parent
7d1e22d53c
commit
87fc64d55c
19 changed files with 290 additions and 573 deletions
|
|
@ -245,8 +245,21 @@ server {
|
|||
NGINX_EOF
|
||||
echo -e "${GREEN}✓ nginx.conf updated${NC}"
|
||||
|
||||
# Update .env file with domain name
|
||||
echo -e "${BLUE}[6/8] Updating environment variables...${NC}"
|
||||
if [[ -f ".env" ]]; then
|
||||
# Update BACKEND_API_ENDPOINT to use domain
|
||||
sed -i.bak "s|^BACKEND_API_ENDPOINT=.*|BACKEND_API_ENDPOINT=https://$DOMAIN_NAME|" .env
|
||||
# Update TURN_HOST to use domain
|
||||
sed -i.bak "s|^TURN_HOST=.*|TURN_HOST=$DOMAIN_NAME|" .env
|
||||
rm -f .env.bak
|
||||
echo -e "${GREEN}✓ .env updated with domain name${NC}"
|
||||
else
|
||||
echo -e "${YELLOW}⚠ .env file not found - skipping environment update${NC}"
|
||||
fi
|
||||
|
||||
# Setup auto-renewal
|
||||
echo -e "${BLUE}[6/7] Setting up automatic certificate renewal...${NC}"
|
||||
echo -e "${BLUE}[7/8] Setting up automatic certificate renewal...${NC}"
|
||||
DOGRAH_PATH=$(pwd)
|
||||
|
||||
# Create renewal hook script that copies new certificates and restarts nginx
|
||||
|
|
@ -268,7 +281,7 @@ certbot renew --dry-run --quiet && echo -e "${GREEN}✓ Auto-renewal configured
|
|||
|
||||
# Start Dograh services
|
||||
echo ""
|
||||
echo -e "${BLUE}[7/7] Starting Dograh services...${NC}"
|
||||
echo -e "${BLUE}[8/8] Starting Dograh services...${NC}"
|
||||
docker compose --profile remote up -d --pull always
|
||||
|
||||
echo ""
|
||||
|
|
@ -287,6 +300,7 @@ echo -e " Auto-renewal: Enabled (certificates renew automatically)"
|
|||
echo ""
|
||||
echo -e "${YELLOW}Files modified:${NC}"
|
||||
echo " - dograh/nginx.conf (updated with domain name)"
|
||||
echo " - dograh/.env (BACKEND_API_ENDPOINT and TURN_HOST updated)"
|
||||
echo " - dograh/certs/local.crt (SSL certificate)"
|
||||
echo " - dograh/certs/local.key (SSL private key)"
|
||||
echo " - /etc/letsencrypt/renewal-hooks/deploy/dograh-reload.sh (renewal hook)"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue