Skip to content

Commit 5e641a8

Browse files
committed
Add some more READMEs
1 parent c772c04 commit 5e641a8

File tree

2 files changed

+77
-0
lines changed

2 files changed

+77
-0
lines changed

gitlist/README.md

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# gitlist — Git Browser Component for code.bioconductor.org
2+
3+
## Description
4+
The `gitlist` directory contains the Dockerized GitList web application used to browse Bioconductor package repositories.
5+
6+
## Architecture
7+
8+
The service runs as two cooperating processes inside a single container:
9+
10+
- **nginx** – A lightweight web server that:
11+
- Listens for HTTP requests from clients.
12+
- Serves static assets (CSS, JS, images) directly for speed.
13+
- Forwards requests that require PHP processing to `php-fpm`.
14+
15+
- **php-fpm** – The PHP FastCGI Process Manager that:
16+
- Runs the GitList PHP code.
17+
- Handles dynamic requests like rendering repository views, diffs, and commit history.
18+
- Returns generated HTML back to `nginx` over a FastCGI interface.
19+
20+
**Flow of a request:**
21+
1. User requests a GitList page (e.g., `/packages/myPackage/commit/1234`).
22+
2. `nginx` checks if it’s a static file — if not, it proxies the request to `php-fpm` via FastCGI.
23+
3. `php-fpm` executes the GitList PHP code, which reads from the Git repositories mounted at `/var/git`.
24+
4. The generated HTML is sent back through `nginx` to the user’s browser.
25+
26+
This separation allows:
27+
- Static files to be served very quickly without touching PHP.
28+
- PHP code to run in a managed, pooled environment (improving performance and stability).
29+
30+
## GoAccess Web Logs
31+
32+
The GitList service’s access logs are analysed using **[GoAccess](https://goaccess.io/)**, a real-time log analyzer.
33+
The GoAccess output is published as a password-protected dashboard at: https://code.bioconductor.org/logs
34+
35+
### GoAccess Features:
36+
37+
- Tracks visitor counts, request types, most popular repositories/pages.
38+
- Monitors response codes, referrers, and bandwidth usage.
39+
- Generates a live HTML report updated every second.
40+
- The `/logs` endpoint is protected by HTTP Basic Authentication configured in `nginx`. Contact Mike Smith for details on the password or update the `nginx-auth-secret` in kubernetes.
41+
42+
## Log Rotation & Maintenance
43+
44+
To prevent large log files from filling the disk:
45+
- **`logrotate`** is configured to:
46+
- Rotate `nginx` access and error logs on a daily schedule retaining the last 90 days.
47+
- Trigger GoAccess processing after rotation so that stats are up-to-date.
48+
49+
- **Kubernetes CronJob**:
50+
- Runs `logrotate` daily to ensure log files are rotated without manual intervention.
51+
- Sends a `kill -USR1 1` message to the pods running `nginx` and `goaccess` to ensure they start using the newly created log files.
52+

mirror-updater/README.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# mirror-updater — Repository Mirroring and Zoekt Indexing
2+
3+
## Description
4+
The `mirror-updater` directory contains scripts and Docker configuration to:
5+
- Maintain a **local mirror** of all Bioconductor Git repositories.
6+
- Keep the **Zoekt code search index** up-to-date.
7+
8+
These components power the repository browsing and search features on [code.bioconductor.org](https://code.bioconductor.org).
9+
10+
## Responsibilities
11+
- Clone all repositories from the Bioconductor Git server when no local mirror exists.
12+
- Update existing mirrored repositories by fetching recent commits.
13+
- Regenerate Zoekt index files for repositories that have changed.
14+
15+
## Command-Line Interface
16+
17+
The main scipt is found in `check_rss_feed.R`. This will `source()` the other files in this directory. It can be run via `Rscript` and can take the following options to modifiy it's behaviour. This can be useful when developing locally to test specific behaviours.
18+
19+
| Flag | Description |
20+
|-----------------|-------------|
21+
| `--all` | When local mirror exists, updates all repositories and clones any missing ones. |
22+
| `--clean` | Clears the local mirror entirely and reloads from scratch. |
23+
| `--npkgs=N` | When initializing or cleaning, limits cloning to the first `N` packages for testing. |
24+
| `--extra_pkgs=` | Include specific named packages, e.g. `--extra_pkgs="c(\"rhdf5\", \"biomaRt\")"`. |
25+

0 commit comments

Comments
 (0)