-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
43 lines (40 loc) · 1.87 KB
/
docker-compose.yaml
File metadata and controls
43 lines (40 loc) · 1.87 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# GitHubby Docker Compose — sample scheduled sync services.
#
# Prerequisites:
# 1. Create a GitHub personal access token (PAT):
# https://github.com/settings/tokens
# Select the "repo" scope for private repositories (public repos work without scopes).
# 2. Create a .env file next to this file with:
# GITHUB_TOKEN=ghp_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
# Or export GITHUB_TOKEN in your shell before running docker compose.
# 3. Adjust service names, users, schedules, and volumes to taste.
#
# Usage:
# docker compose up -d # start all services
# docker compose logs -f # follow logs
# docker compose down # stop all services
services:
# Syncs every saved TUI profile every 6 hours.
# Profiles are read from the persistent "githubby-state" volume,
# so you need to create them via the TUI first (or copy state.yaml in).
sync-all-profiles:
image: ghcr.io/didstopia/githubby:latest
command: ["sync", "--all-profiles", "--schedule", "0 */6 * * *"] # At minute 0 past every 6th hour
environment:
- GITHUB_TOKEN=${GITHUB_TOKEN}
volumes:
- ./repos:/repos # local directory for cloned repositories
- githubby-state:/root/.githubby # persists profiles & sync history between restarts
restart: unless-stopped
# Syncs all repositories for a single GitHub user every 30 minutes.
# Replace "myuser" with the GitHub username you want to sync.
sync-user:
image: ghcr.io/didstopia/githubby:latest
command: ["sync", "--user", "myuser", "--target", "/repos", "--schedule", "*/30 * * * *"] # Every 30 minutes
environment:
- GITHUB_TOKEN=${GITHUB_TOKEN}
volumes:
- ./repos:/repos # local directory for cloned repositories
restart: unless-stopped
volumes:
githubby-state: # named volume — keeps ~/.githubby/state.yaml across container recreates