This commit is contained in:
parent
287cffb68e
commit
c35aa8e264
53
README.md
Normal file
53
README.md
Normal file
|
|
@ -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
|
||||
Loading…
Reference in a new issue