1.9 KiB
1.9 KiB
Yamtrack Deployment
This repository contains the deployment configuration for Yamtrack, a self-hosted analytics or tracking utility. It utilizes a Redis backend for high-performance data handling.
🏗️ Architecture Overview
- Service: Yamtrack (Main Application)
- Backend: Redis (Alpine-based)
- Networking: Integrated into the
web_trafficexternal network for reverse proxy access. - CI/CD: Automated deployment via Woodpecker CI on every push to the
mainbranch.
📂 Repository Structure
docker-compose.yaml: Orchestrates the Yamtrack application and its Redis dependency..woodpecker.yaml: Handles automated deployment to the host server..env.example: Template for required secrets and URL configuration..gitignore: Ensures the active.envand local./datadirectory remain untracked.
🚀 Getting Started
1. Environment Configuration
Yamtrack requires specific environment variables to function correctly. Create your local .env file from the template:
cp .env.example .env
Edit the .env file with the following variables:
- SECRET: A unique, random string used for application security.
- URLS: The public-facing domain(s) where the application is hosted (e.g., https://stats.georgew.dev).
2. Manual Deployment
Ensure the web_traffic network exists:
docker network create web_traffic
docker compose up -d
🔄 CI/CD Workflow
The Woodpecker CI pipeline triggers on every push to main. It:
- Syncs the repository configuration to the server directory.
- Triggers a docker compose up -d with --pull always and --force-recreate.
- Ensures the Redis container is healthy and available before the application starts.
## 💾 Persistence
- Application Data: Mapped to the ./data directory.
- Cache: Managed by the internal yamtrack-redis container.
⚙️ Environment Details
- Timezone: Europe/Copenhagen