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