{"id":35163916,"url":"https://github.com/ducks/burrow","last_synced_at":"2026-05-19T18:11:59.250Z","repository":{"id":329648527,"uuid":"1120304981","full_name":"ducks/burrow","owner":"ducks","description":"Docker config for my Fornex VPS","archived":false,"fork":false,"pushed_at":"2025-12-20T23:39:40.000Z","size":14,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-12-22T21:36:35.107Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ducks.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-12-20T23:14:52.000Z","updated_at":"2025-12-20T23:39:44.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/ducks/burrow","commit_stats":null,"previous_names":["ducks/burrow"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/ducks/burrow","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ducks%2Fburrow","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ducks%2Fburrow/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ducks%2Fburrow/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ducks%2Fburrow/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ducks","download_url":"https://codeload.github.com/ducks/burrow/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ducks%2Fburrow/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28102735,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-12-28T02:00:05.685Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-12-28T19:03:28.386Z","updated_at":"2025-12-28T19:05:41.602Z","avatar_url":"https://github.com/ducks.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Infrastructure\n\nDeclarative burrow setup for VPS services.\n\n## Services\n\n- **Caddy** - Reverse proxy with automatic HTTPS (Let's Encrypt)\n- **Gitea** - Self-hosted Git service (code.jakegoldsborough.com)\n- **GoatCounter JG** - Analytics for jakegoldsborough.com (stats.jakegoldsborough.com)\n- **GoatCounter DV** - Analytics for date-ver.com (stats.date-ver.com)\n- **PostgreSQL** - Single database instance with multiple databases\n\n## First-Time Setup\n\n### 1. On your VPS, install Docker\n\n```bash\n# Arch Linux\nsudo pacman -S docker docker-compose\nsudo systemctl enable --now docker\nsudo usermod -aG docker $USER\n# Log out and back in for group to take effect\n```\n\n### 2. Clone the repository\n\n```bash\ncd ~\ngit clone \u003cyour-repo-url\u003e burrow\ncd burrow\n```\n\n### 3. Bootstrap environment file\n\n```bash\n./bin/bootstrap\n```\n\nThis will:\n- Generate secure random passwords\n- Create `.env` file automatically\n- Make all scripts executable\n\nOr manually:\n```bash\ncp .env.example .env\nnano .env  # Set secure passwords for all services\nchmod +x bin/* postgres/init-databases.sh\n```\n\n### 4. Start the stack\n\n```bash\ndocker compose up -d\n```\n\n### 5. Check status\n\n```bash\ndocker compose ps\ndocker compose logs -f\n```\n\n### 6. Enable systemd auto-start (optional)\n\n```bash\nsudo cp systemd/burrow.service /etc/systemd/system/\nsudo systemctl daemon-reload\nsudo systemctl enable burrow.service\nsudo systemctl status burrow.service\n```\n\n## Accessing Services\n\n- **Gitea**: https://code.jakegoldsborough.com\n  - SSH: `git clone ssh://git@code.jakegoldsborough.com:2222/user/repo.git`\n- **GoatCounter JG**: https://stats.jakegoldsborough.com\n- **GoatCounter DV**: https://stats.date-ver.com\n\n## Management\n\n### Deploy updates\n\n```bash\n./bin/deploy\n```\n\nOr manually:\n```bash\ngit pull\ndocker compose pull\ndocker compose up -d\n```\n\n### View logs\n\n```bash\n# All services\ndocker compose logs -f\n\n# Specific service\ndocker compose logs -f gitea\ndocker compose logs -f caddy\n```\n\n### Backup databases\n\n```bash\n./bin/backup\n```\n\nBackups are saved to `./backups/` with timestamps.\n\n### Restore database\n\n```bash\n# Example: restore Gitea database\ngunzip -c backups/gitea_20231220_120000.sql.gz | docker exec -i postgres psql -U gitea gitea\n```\n\n## Migrating Existing Databases\n\nIf you have existing databases to migrate:\n\n### Option 1: Import during first startup\n\n1. Place your SQL dumps in `postgres/` directory\n2. Modify `postgres/init-databases.sh` to import them after creating databases\n3. Start the stack\n\n### Option 2: Import after startup\n\n```bash\n# Import Gitea database\ncat your-gitea-dump.sql | docker exec -i postgres psql -U gitea gitea\n\n# Import GoatCounter databases\ncat your-goatcounter-jg-dump.sql | docker exec -i postgres psql -U goatcounter_jg goatcounter_jg\ncat your-goatcounter-dv-dump.sql | docker exec -i postgres psql -U goatcounter_dv goatcounter_dv\n```\n\n## Firewall\n\nMake sure ports are open:\n\n```bash\n# Using UFW\nsudo ufw allow 22/tcp    # SSH\nsudo ufw allow 80/tcp    # HTTP\nsudo ufw allow 443/tcp   # HTTPS\nsudo ufw allow 2222/tcp  # Gitea SSH\nsudo ufw enable\n```\n\n## Troubleshooting\n\n### Check container status\n```bash\ndocker compose ps\n```\n\n### View container logs\n```bash\ndocker compose logs -f \u003cservice-name\u003e\n```\n\n### Restart a service\n```bash\ndocker compose restart \u003cservice-name\u003e\n```\n\n### Restart everything\n```bash\ndocker compose down\ndocker compose up -d\n```\n\n### Access PostgreSQL directly\n```bash\ndocker exec -it postgres psql -U postgres\n```\n\n### Check Let's Encrypt certificate status\n```bash\ndocker exec caddy caddy list-certificates\n```\n\n## Directory Structure\n\n```\nburrow/\n├── docker-compose.yml        # Service definitions\n├── Caddyfile                 # Reverse proxy config\n├── .env                      # Secrets (git-ignored)\n├── .env.example              # Template for .env\n├── .gitignore                # Git ignore rules\n├── systemd/\n│   └── burrow.service # Systemd unit for auto-start\n├── postgres/\n│   └── init-databases.sh     # Database initialization\n├── bin/\n│   ├── bootstrap             # Initial setup script\n│   ├── deploy                # Deployment helper\n│   └── backup                # Backup helper\n└── README.md                 # This file\n```\n\n## Notes\n\n- All configuration is declarative and version-controlled\n- Secrets are in `.env` (git-ignored), with `.env.example` as template\n- Caddy automatically handles HTTPS certificates via Let's Encrypt\n- All services communicate via Docker network (not exposed to host except Caddy and Gitea SSH)\n- Persistent data is stored in Docker named volumes\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fducks%2Fburrow","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fducks%2Fburrow","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fducks%2Fburrow/lists"}