From c35aa8e264bc6e68495de0c4b856d50ec2708736 Mon Sep 17 00:00:00 2001 From: GeorgeWebberley Date: Mon, 2 Feb 2026 21:22:42 +0100 Subject: [PATCH] Added README --- README.md | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..e320d65 --- /dev/null +++ b/README.md @@ -0,0 +1,53 @@ +# 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_traffic` external network for reverse proxy access. +* **CI/CD**: Automated deployment via Woodpecker CI on every push to the `main` branch. + +## 📂 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 `.env` and local `./data` directory remain untracked. + +## 🚀 Getting Started + +### 1. Environment Configuration +Yamtrack requires specific environment variables to function correctly. Create your local `.env` file from the template: + +```bash +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: +```bash +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 \ No newline at end of file