docker compose
This commit is contained in:
@@ -54,7 +54,7 @@ docker volume create certbot-webroot 2>/dev/null || true
|
|||||||
|
|
||||||
# Starte temporären HTTP-Server für Domain-Validierung
|
# Starte temporären HTTP-Server für Domain-Validierung
|
||||||
echo -e "${YELLOW}🌐 Starte temporären HTTP-Server...${NC}"
|
echo -e "${YELLOW}🌐 Starte temporären HTTP-Server...${NC}"
|
||||||
docker-compose -f docker-compose-prod.yml up -d nginx
|
docker compose -f docker compose-prod.yml up -d nginx
|
||||||
|
|
||||||
# Warte bis Nginx läuft
|
# Warte bis Nginx läuft
|
||||||
echo -e "${YELLOW}⏳ Warte auf Nginx...${NC}"
|
echo -e "${YELLOW}⏳ Warte auf Nginx...${NC}"
|
||||||
@@ -62,7 +62,7 @@ sleep 10
|
|||||||
|
|
||||||
# Erstelle SSL-Zertifikat
|
# Erstelle SSL-Zertifikat
|
||||||
echo -e "${YELLOW}🔐 Erstelle SSL-Zertifikat für $DOMAIN...${NC}"
|
echo -e "${YELLOW}🔐 Erstelle SSL-Zertifikat für $DOMAIN...${NC}"
|
||||||
docker-compose -f docker-compose-prod.yml run --rm certbot certbot certonly \
|
docker compose -f docker compose-prod.yml run --rm certbot certbot certonly \
|
||||||
--webroot \
|
--webroot \
|
||||||
--webroot-path=/var/www/certbot \
|
--webroot-path=/var/www/certbot \
|
||||||
--email $ADMIN_EMAIL \
|
--email $ADMIN_EMAIL \
|
||||||
@@ -84,23 +84,23 @@ fi
|
|||||||
|
|
||||||
# Starte alle Services
|
# Starte alle Services
|
||||||
echo -e "${YELLOW}🚀 Starte alle Services...${NC}"
|
echo -e "${YELLOW}🚀 Starte alle Services...${NC}"
|
||||||
docker-compose -f docker-compose-prod.yml up -d
|
docker compose -f docker compose-prod.yml up -d
|
||||||
|
|
||||||
# Prüfe Status
|
# Prüfe Status
|
||||||
echo -e "${YELLOW}🔍 Prüfe Service-Status...${NC}"
|
echo -e "${YELLOW}🔍 Prüfe Service-Status...${NC}"
|
||||||
sleep 5
|
sleep 5
|
||||||
|
|
||||||
if docker-compose -f docker-compose-prod.yml ps | grep -q "Up"; then
|
if docker compose -f docker compose-prod.yml ps | grep -q "Up"; then
|
||||||
echo -e "${GREEN}✅ Alle Services laufen!${NC}"
|
echo -e "${GREEN}✅ Alle Services laufen!${NC}"
|
||||||
echo ""
|
echo ""
|
||||||
echo -e "${BLUE}🌐 Deine Anwendung ist jetzt verfügbar unter:${NC}"
|
echo -e "${BLUE}🌐 Deine Anwendung ist jetzt verfügbar unter:${NC}"
|
||||||
echo -e "${GREEN} https://$DOMAIN${NC}"
|
echo -e "${GREEN} https://$DOMAIN${NC}"
|
||||||
echo ""
|
echo ""
|
||||||
echo -e "${BLUE}📋 Nützliche Befehle:${NC}"
|
echo -e "${BLUE}📋 Nützliche Befehle:${NC}"
|
||||||
echo " Status anzeigen: docker-compose -f docker-compose-prod.yml ps"
|
echo " Status anzeigen: docker compose -f docker compose-prod.yml ps"
|
||||||
echo " Logs anzeigen: docker-compose -f docker-compose-prod.yml logs -f"
|
echo " Logs anzeigen: docker compose -f docker compose-prod.yml logs -f"
|
||||||
echo " Services stoppen: docker-compose -f docker-compose-prod.yml down"
|
echo " Services stoppen: docker compose -f docker compose-prod.yml down"
|
||||||
echo " Zertifikat erneuern: docker-compose -f docker-compose-prod.yml run --rm certbot certbot renew"
|
echo " Zertifikat erneuern: docker compose -f docker compose-prod.yml run --rm certbot certbot renew"
|
||||||
echo ""
|
echo ""
|
||||||
echo -e "${YELLOW}⚠️ Wichtig:${NC}"
|
echo -e "${YELLOW}⚠️ Wichtig:${NC}"
|
||||||
echo " - SSL-Zertifikate werden automatisch alle 12 Stunden erneuert"
|
echo " - SSL-Zertifikate werden automatisch alle 12 Stunden erneuert"
|
||||||
@@ -108,6 +108,6 @@ if docker-compose -f docker-compose-prod.yml ps | grep -q "Up"; then
|
|||||||
echo " - Stelle sicher, dass Port 80 und 443 erreichbar sind"
|
echo " - Stelle sicher, dass Port 80 und 443 erreichbar sind"
|
||||||
else
|
else
|
||||||
echo -e "${RED}❌ Einige Services sind nicht gestartet!${NC}"
|
echo -e "${RED}❌ Einige Services sind nicht gestartet!${NC}"
|
||||||
echo "Prüfe die Logs: docker-compose -f docker-compose-prod.yml logs"
|
echo "Prüfe die Logs: docker compose -f docker compose-prod.yml logs"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
Reference in New Issue
Block a user