Docker mit traefik und portainer

This commit is contained in:
rxf
2025-09-22 16:35:59 +02:00
parent 6d04ab93c0
commit a255543da6
64 changed files with 5421 additions and 25 deletions

68
setup-citysensor.sh Executable file
View File

@@ -0,0 +1,68 @@
#!/bin/bash
set -e
echo "🏢 CitySensor Docker Registry Setup"
echo "====================================="
echo ""
# Check if required files exist
if [ ! -f .env.build.example ]; then
echo "❌ Error: .env.build.example not found!"
exit 1
fi
echo "📋 Setup Steps:"
echo ""
echo "1⃣ Create build configuration:"
echo " cp .env.build.example .env.registry"
echo " # Edit .env.registry with your CitySensor credentials"
echo ""
echo "2⃣ Required values in .env.registry:"
echo " DOCKER_REGISTRY=docker.citysensor.de"
echo " DOCKER_USERNAME=your_citysensor_username"
echo " DOCKER_PASSWORD=your_citysensor_password"
echo " DOMAIN=your.domain.com"
echo " API_BASE_URL=https://rezepte.your.domain.com/api"
echo ""
echo "3⃣ Build and push to CitySensor registry:"
echo " ./build-and-push.sh"
echo ""
echo "4⃣ For server deployment, create .env.production:"
echo " cp .env.traefik.example .env.production"
echo " # Edit with your server configuration"
echo ""
echo "5⃣ Server deployment files needed:"
echo " - docker-compose.traefik.yml"
echo " - .env.production"
echo " - *.sql files"
echo " - deploy-traefik.sh"
echo ""
echo "6⃣ Deploy on server:"
echo " ./deploy-traefik.sh"
echo ""
echo "🔧 Example .env.registry content:"
echo "DOMAIN=example.com"
echo "ACME_EMAIL=admin@example.com"
echo "API_BASE_URL=https://rezepte.example.com/api"
echo "MYSQL_PASSWORD=secure_db_password"
echo "MYSQL_ROOT_PASSWORD=super_secure_root_password"
echo "DOCKER_REGISTRY=docker.citysensor.de"
echo "DOCKER_USERNAME=your_username"
echo "DOCKER_PASSWORD=your_password"
echo "BACKEND_IMAGE=docker.citysensor.de/rezepte-klaus-backend:latest"
echo "FRONTEND_IMAGE=docker.citysensor.de/rezepte-klaus-frontend:latest"
echo ""
echo "✅ After setup, your app will be available at:"
echo " https://rezepte.your.domain.com"
echo ""
echo "🛡️ Security Note:"
echo " Never commit .env.registry or .env.production to version control!"