Files
Rezepte/setup-citysensor.sh

68 lines
1.9 KiB
Bash
Executable File
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/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-backend:latest"
echo "FRONTEND_IMAGE=docker.citysensor.de/rezepte-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!"