FossilRepo
| 2eca4eb… | ragelink | 1 | # Creating Your First Repository |
| 2eca4eb… | ragelink | 2 | |
| 2eca4eb… | ragelink | 3 | Once fossilrepo is running, you can create your first Fossil repository. |
| 2eca4eb… | ragelink | 4 | |
| 2eca4eb… | ragelink | 5 | ## Via the Dashboard |
| 2eca4eb… | ragelink | 6 | |
| 2eca4eb… | ragelink | 7 | 1. Log in at `http://localhost:8000` |
| 2eca4eb… | ragelink | 8 | 2. Navigate to **Repositories** in the sidebar |
| 2eca4eb… | ragelink | 9 | 3. Click **Create Repository** |
| 2eca4eb… | ragelink | 10 | 4. Enter a name (e.g., `my-project`) |
| 2eca4eb… | ragelink | 11 | 5. Click **Create** |
| 2eca4eb… | ragelink | 12 | |
| 2eca4eb… | ragelink | 13 | The repository is immediately available at `my-project.your-domain.com` (production) or through the local Fossil server (development). |
| 2eca4eb… | ragelink | 14 | |
| 2eca4eb… | ragelink | 15 | ## Via the CLI |
| 2eca4eb… | ragelink | 16 | |
| 2eca4eb… | ragelink | 17 | ```bash |
| 2eca4eb… | ragelink | 18 | # Inside the fossilrepo container |
| 2eca4eb… | ragelink | 19 | docker compose exec django python manage.py fossil_create my-project |
| 2eca4eb… | ragelink | 20 | ``` |
| 2eca4eb… | ragelink | 21 | |
| 2eca4eb… | ragelink | 22 | This runs `fossil init`, registers the repo in the database, and (in production) Caddy automatically routes the subdomain. |
| 2eca4eb… | ragelink | 23 | |
| 2eca4eb… | ragelink | 24 | ## What Happens Under the Hood |
| 2eca4eb… | ragelink | 25 | |
| 2eca4eb… | ragelink | 26 | ```mermaid |
| 2eca4eb… | ragelink | 27 | sequenceDiagram |
| 2eca4eb… | ragelink | 28 | participant User |
| 2eca4eb… | ragelink | 29 | participant Django |
| 2eca4eb… | ragelink | 30 | participant Fossil |
| 2eca4eb… | ragelink | 31 | participant Litestream |
| 2eca4eb… | ragelink | 32 | participant S3 |
| 2eca4eb… | ragelink | 33 | |
| 2eca4eb… | ragelink | 34 | User->>Django: Create repo "my-project" |
| 2eca4eb… | ragelink | 35 | Django->>Fossil: fossil init /data/repos/my-project.fossil |
| 2eca4eb… | ragelink | 36 | Fossil-->>Django: Repository created |
| 2eca4eb… | ragelink | 37 | Django->>Django: Register in database |
| 2eca4eb… | ragelink | 38 | Litestream->>S3: Begin replicating my-project.fossil |
| 2eca4eb… | ragelink | 39 | Django-->>User: Repository ready |
| 2eca4eb… | ragelink | 40 | ``` |
| 2eca4eb… | ragelink | 41 | |
| 2eca4eb… | ragelink | 42 | ## Accessing Your Repository |
| 2eca4eb… | ragelink | 43 | |
| 2eca4eb… | ragelink | 44 | ### Web UI |
| 2eca4eb… | ragelink | 45 | |
| 2eca4eb… | ragelink | 46 | Fossil includes a built-in web interface with: |
| 2eca4eb… | ragelink | 47 | |
| 2eca4eb… | ragelink | 48 | - **Timeline** -- commit history with diffs |
| 2eca4eb… | ragelink | 49 | - **Tickets** -- issue tracker |
| 2eca4eb… | ragelink | 50 | - **Wiki** -- project documentation |
| 2eca4eb… | ragelink | 51 | - **Forum** -- discussions |
| 2eca4eb… | ragelink | 52 | |
| 2eca4eb… | ragelink | 53 | ### Clone via Fossil |
| 2eca4eb… | ragelink | 54 | |
| 2eca4eb… | ragelink | 55 | ```bash |
| 2eca4eb… | ragelink | 56 | fossil clone https://my-project.your-domain.com my-project.fossil |
| 2eca4eb… | ragelink | 57 | fossil open my-project.fossil |
| 2eca4eb… | ragelink | 58 | ``` |
| 2eca4eb… | ragelink | 59 | |
| 2eca4eb… | ragelink | 60 | ### Clone via Git (Mirror) |
| 2eca4eb… | ragelink | 61 | |
| 2eca4eb… | ragelink | 62 | If you've configured the sync bridge: |
| 2eca4eb… | ragelink | 63 | |
| 2eca4eb… | ragelink | 64 | ```bash |
| 2eca4eb… | ragelink | 65 | git clone https://github.com/your-org/my-project.git |
| 2eca4eb… | ragelink | 66 | ``` |
| 2eca4eb… | ragelink | 67 | |
| 2eca4eb… | ragelink | 68 | !!! warning "Read-only mirror" |
| 2eca4eb… | ragelink | 69 | Git mirrors are downstream copies. Push changes to the Fossil repo -- they'll sync to Git automatically. |
| 2eca4eb… | ragelink | 70 | |
| 2eca4eb… | ragelink | 71 | ## Next Steps |
| 2eca4eb… | ragelink | 72 | |
| 2eca4eb… | ragelink | 73 | - [Configure the sync bridge](../architecture/sync-bridge.md) to mirror to GitHub/GitLab |
| 2eca4eb… | ragelink | 74 | - [Set up backups](configuration.md#litestream-backups) with Litestream |
| 2eca4eb… | ragelink | 75 | - Explore the [architecture overview](../architecture/overview.md) |