- Alle Markdown-Dateien (außer README.md) nach docs/ verschoben - Referenzen in README.md aktualisiert - /docs zu .dockerignore hinzugefügt
2.8 KiB
Deployment Guide
Automated Deployment
Use the deployment script for zero-downtime deployments:
./scripts/deploy.sh
This script will:
- Create a database backup
- Pull latest changes from git
- Fetch all git tags (for version display)
- Build the new Docker image
- Restart the container with minimal downtime
- Clean up old images
Manual Deployment
If you need to deploy manually:
# Pull latest changes
git pull
# Fetch tags (important for version display!)
git fetch --tags
# Build and restart
docker compose build
docker compose up -d
Version Display
The app displays the current version in the footer. The version is determined as follows:
- During Docker build: The version is extracted from git tags using
git describe --tags --always - At runtime: The version is read from
/app/version.txtand exposed via the/api/versionendpoint - Local development: The version is extracted directly from git on each request
Building with a specific version
You can override the version during build:
docker compose build --build-arg APP_VERSION=v1.2.3
Troubleshooting
If the version shows as "dev" or "unknown":
-
Make sure git tags are pushed to the remote repository:
git push --tags -
On the deployment server, fetch the tags:
git fetch --tags -
Verify tags are available:
git describe --tags --always -
Rebuild the Docker image:
docker compose build --no-cache docker compose up -d
Health Check
The container includes a health check that monitors the /api/daily endpoint. Check the health status:
docker ps
Look for the "healthy" status in the STATUS column.
Caddy Reverse Proxy (Optional - Production)
For production deployments with automatic SSL/TLS certificates, Caddy can be used as a reverse proxy. Caddy provides:
- Automatic Let's Encrypt certificates (including wildcard certificates)
- HTTP to HTTPS redirect
- Optimized settings for audio streaming and file uploads
- Support for both
hoerdle.deandhördle.de(Punycode:xn--hrdle-jua.de)
Quick Start
- Follow the setup guide: See
CADDY_SETUP.mdfor detailed instructions - Configure environment variables: Add GoDaddy API credentials to your
.envfile - Start with Caddy:
docker compose -f docker-compose.yml -f docker-compose.caddy.yml --profile production up -d
Without Caddy
If you don't want to use Caddy, you can deploy normally:
docker compose -f docker-compose.yml up -d
The application will still be accessible on port 3010, but you'll need to configure SSL/TLS separately (e.g., with nginx).
Caddy Troubleshooting
See CADDY_SETUP.md for detailed troubleshooting information.