| 33 | 34 | | ``` |
| 34 | 35 | | |
| 35 | 36 | | Default admin credentials: `admin` / `changeme` |
| 37 | + | Set the `ADMIN_PASSWORD` environment variable **before** running `db:init` to choose your own. |
| 36 | 38 | | |
| 37 | | - | ## Manual repository interactions |
| 39 | + | ### Docker / Podman |
| 38 | 40 | | |
| 39 | | - | Existing Repositories can be copied manually to the `data/repos` directory. |
| 40 | | - | Non-bare repos are automatically converted to bare repos on startup, discarding uncomitted changes and worktrees. |
| 41 | | - | Pushing directly to the repositories (i.e. not through the bundled http/ssh endpoints) should generally works as well. |
| 41 | + | A `Containerfile` and `compose.yml` are provided: |
| 42 | 42 | | |
| 43 | | - | ### Docker / Podman |
| 44 | | - | Container image and compose file are provided. |
| 45 | 43 | | ```bash |
| 46 | | - | docker compose up # or |
| 47 | | - | podman compose up |
| 44 | + | docker compose up # or podman compose up |
| 48 | 45 | | ``` |
| 49 | 46 | | |
| 50 | | - | ### Configuration |
| 47 | + | The container stores all persistent data (repos, database, avatars, releases, SSH host key) under `/data` — mount a volume there to keep it across restarts. |
| 51 | 48 | | |
| 52 | | - | All settings are environment variables: |
| 49 | + | ### Manual repository import |
| 50 | + | |
| 51 | + | Existing repositories can be copied into the `data/repos` directory. |
| 52 | + | Non-bare repos are automatically converted to bare repos on startup (uncommitted changes and worktrees are discarded). |
| 53 | + | Pushing directly to the on-disk repositories (bypassing the bundled HTTP/SSH endpoints) generally works as well. |
| 53 | 54 | | |
| 54 | | - | | Variable | Default | Description | |
| 55 | | - | |-------------------------|----------------------------------|--------------------------------------------------------------------------------| |
| 56 | | - | | `PORT` | `3000` | HTTP port | |
| 57 | | - | | `SSH_PORT` | `2222` | SSH port | |
| 58 | | - | | `DATA_DIR` | `./data` | Repos, database, uploads | |
| 59 | | - | | `ADMIN_PASSWORD` | `changeme` | Initial admin password | |
| 60 | | - | | `OWNER_DISPLAY_NAME` | `Admin` | Display name for the owner | |
| 61 | | - | | `BASE_URL` | `http://localhost:3000` | Used in clone URLs and links | |
| 62 | | - | | `REGISTRATION_TYPE` | `enabled` | Registration mode: `enabled`, `disabled`, or `queue` (requires admin approval) | |
| 63 | | - | | `REGISTER_QUESTION` | _(empty)_ | Question shown on the registration form when `REGISTRATION_TYPE=queue` | |
| 64 | | - | | `MAX_UPLOAD_BYTES` | `10485760` | Max request body size (any uploads/requests) | |
| 65 | | - | | `MAX_USER_UPLOAD_BYTES` | `2097152` | Max request body size (user uploads) | |
| 66 | | - | | `INLINE_MAX_BYTES` | `524288` | Max file size to render inline in the file view | |
| 67 | | - | | `SSH_DISABLED` | `0` | Disable the embedded SSH-server | |
| 68 | | - | | `TRUSTED_PROXY` | `0` | Trust `X-Forwarded-For` | |
| 69 | | - | | `RATE_LIMIT_DISABLED` | `0` | Set to `1` to disable rate limiting | |
| 70 | | - | | `HIGHLIGHT_WORKERS` | `4` | Number of syntax highlighting workers* | |
| 71 | | - | | `COMMITTER_NAME` | `$OWNER_DISPLAY_NAME` | Git committer name used when merging patches or editing files through the UI | |
| 72 | | - | | `COMMITTER_EMAIL` | `$OWNER_DISPLAY_NAME@<hostname>` | same as above but for email | |
| 73 | | - | | `MAX_TITLE_BYTES` | `500` | Max length for titles (issues, patches, releases) | |
| 74 | | - | | `MAX_TEXT_BODY_BYTES` | `100000` | Max length for text bodies (issue/patch descriptions, comments, release notes) | |
| 75 | | - | | `MAX_USERNAME_BYTES` | `64` | Max length for usernames at registration | |
| 76 | | - | | `MAX_PASSWORD_BYTES` | `1024` | Max length for passwords at registration and password change | |
| 77 | | - | |
| 78 | | - | \* More workers mean more CPU cores can be used to parallelize highlighting of files. |
| 79 | | - | Because of the language grammars, which can't be shared across workers, the memory usage per worker is quite high, at about 200MB. |
| 80 | | - | So be careful when increasing this. |
| 81 | 55 | | ### SSH access |
| 82 | 56 | | |
| 83 | | - | Add your public key under Settings → SSH keys, then clone with: |
| 57 | + | Add your public key under **Settings → SSH keys**, then: |
| 84 | 58 | | |
| 85 | 59 | | ``` |
| 86 | | - | git clone ssh://git@localhost:{SSH_PORT}/{REPO_NAME} |
| 60 | + | git clone ssh://git@localhost:2222/REPO_NAME |
| 87 | 61 | | ``` |
| 88 | 62 | | |
| 89 | | - | Pushing is also supported for the admin. |
| 63 | + | Pushing is supported for the admin. |
| 64 | + | |
| 65 | + | ### Configuration |
| 66 | + | |
| 67 | + | All settings are environment variables: |
| 68 | + | |
| 69 | + | | Variable | Default | Description | |
| 70 | + | |------------------------------|----------------------------------|-------------------------------------------------------------| |
| 71 | + | | `PORT` | `3000` | HTTP port | |
| 72 | + | | `SSH_PORT` | `2222` | SSH port | |
| 73 | + | | `DATA_DIR` | `./data` | Repos, database, uploads | |
| 74 | + | | `ADMIN_PASSWORD` | `changeme` | Initial admin password (only used by `db:init`) | |
| 75 | + | | `OWNER_DISPLAY_NAME` | `Admin` | Display name for the owner | |
| 76 | + | | `BASE_URL` | `http://localhost:$PORT` | Used in clone URLs and links | |
| 77 | + | | `REGISTRATION_TYPE` | `enabled` | `enabled`, `disabled`, or `queue` (admin approval) | |
| 78 | + | | `REGISTER_QUESTION` | _(empty)_ | Question shown on the registration form in `queue` mode | |
| 79 | + | | `MAX_UPLOAD_BYTES` | `10485760` | Max request body size (10 MB) | |
| 80 | + | | `MAX_USER_UPLOAD_BYTES` | `2097152` | Max upload size for non-admin users (2 MB) | |
| 81 | + | | `INLINE_MAX_BYTES` | `524288` | Max file size rendered inline in the code view (512 KB) | |
| 82 | + | | `SSH_DISABLED` | `0` | Set to `1` to disable the embedded SSH server | |
| 83 | + | | `TRUSTED_PROXY` | `0` | Trust `X-Forwarded-For` headers | |
| 84 | + | | `RATE_LIMIT_DISABLED` | `0` | Set to `1` to disable rate limiting | |
| 85 | + | | `HIGHLIGHT_WORKERS` | `4` | Syntax highlighting worker threads \* | |
| 86 | + | | `COMMITTER_NAME` | `$OWNER_DISPLAY_NAME` | Git committer name for merges and UI edits | |
| 87 | + | | `COMMITTER_EMAIL` | `$OWNER_DISPLAY_NAME@<hostname>` | Git committer email for merges and UI edits | |
| 88 | + | | `SSH_HOST_KEY_PATH` | `$DATA_DIR/ssh_host_key` | Path to the SSH host key (auto-generated if missing) | |
| 89 | + | | `EXTRA_ALLOWED_SIGNERS_PATH` | _(empty)_ | Additional git allowed-signers file for commit verification | |
| 90 | + | | `MAX_TITLE_BYTES` | `500` | Max length for titles (issues, patches, releases) | |
| 91 | + | | `MAX_TEXT_BODY_BYTES` | `100000` | Max length for text bodies (descriptions, comments, notes) | |
| 92 | + | | `MAX_USERNAME_BYTES` | `64` | Max username length at registration | |
| 93 | + | | `MAX_PASSWORD_BYTES` | `1024` | Max password length | |
| 94 | + | |
| 95 | + | \* Each highlighting worker loads its own copy of the language grammars and uses ~200 MB of memory. Increase with care. |
| 90 | 96 | | |
| 91 | 97 | | ## Development |
| 92 | 98 | | |
| 93 | 99 | | ```bash |
| 94 | | - | bun run dev # watch mode |
| 95 | | - | bun run lint # Biome lint |
| 96 | | - | bun run format # Biome format |
| 97 | | - | bun run test # Run E2E and unit tests (don't use bun test directly, it doesn't respect the timeout) |
| 100 | + | bun run dev # watch mode with auto-restart |
| 101 | + | bun run lint # lint with Biome |
| 102 | + | bun run format # format with Biome |
| 103 | + | bun run test # E2E and unit tests (uses Playwright; don't call bun test directly) |
| 98 | 104 | | ``` |
| 99 | 105 | | |
| 100 | 106 | | ## Roadmap |
| 107 | + | |
| 101 | 108 | | - Use [git-bug](https://github.com/git-bug/git-bug) for issue tracking instead of custom implementation |
| 102 | | - | - more repository manipulation through the UI, e.g. file/directory/branch creation, renaming and deletion |
| 103 | | - | - remove test retry logic when bun doesn't randomly get stuck anymore |
| 109 | + | - More repository manipulation through the UI — file/directory/branch creation, renaming, and deletion |
| 110 | + | - Remove test retry logic once Bun no longer randomly stalls |