summaryrefslogtreecommitdiff
path: root/CLAUDE.md
diff options
context:
space:
mode:
Diffstat (limited to 'CLAUDE.md')
-rw-r--r--CLAUDE.md26
1 files changed, 21 insertions, 5 deletions
diff --git a/CLAUDE.md b/CLAUDE.md
index 1bb1ef1..0ab9222 100644
--- a/CLAUDE.md
+++ b/CLAUDE.md
@@ -5,7 +5,7 @@ Bastion is a self-hosted server system on Debian that runs multiple services in
## Domain
- Primary domain: `swave.lol`
-- Subdomains: `blog.swave.lol`, `ghost.swave.lol`, `jenkins.swave.lol`, `cgit.swave.lol`, `gerrit.swave.lol`
+- Subdomains: `blog.swave.lol`, `ghost.swave.lol`, `jenkins.swave.lol`, `cgit.swave.lol`, `gerrit.swave.lol`, `nexus.swave.lol`, `registry.swave.lol`
## Services / Stacks
@@ -64,10 +64,22 @@ Bastion is a self-hosted server system on Debian that runs multiple services in
- Startup script: `jenkins/init.groovy.d/clear-stuck-builds.groovy` auto-cleans stuck builds on restart
- Currently runs all builds on the controller via DooD; supports adding permanent SSH agents for scaling (see setup guide 6.6)
+### Nexus (artifact repository & Docker registry)
+- Dir: `nexus/`
+- Compose: `nexus/docker-compose.yaml`
+- Image: `sonatype/nexus3:latest` (no custom Dockerfile)
+- Network: `nexus_network` (172.25.0.0/16, static IP 172.25.0.2)
+- Nexus web UI on port 8081 internally, Docker registry API on port 5000
+- No host ports (accessed only via main nginx reverse proxy)
+- Volume: `/var/nexus-data` (must be owned by UID 200)
+- Accessible at `https://nexus.swave.lol` and `https://swave.lol/nexus`
+- Docker registry accessible at `https://registry.swave.lol`
+- Docker registry requires manual setup after first login: create a "docker (hosted)" repository with HTTP connector on port 5000
+
### Nginx (reverse proxy)
- Dir: `nginx/`
- Compose: `nginx/docker-compose.yaml`
-- Network: joins `git-network` (IP 172.22.0.254), `ghost_network`, `jenkins_network`
+- Network: joins `git-network` (IP 172.22.0.254), `ghost_network`, `jenkins_network`, `nexus_network`
- Ports: 80 (HTTP, redirects to HTTPS), 443 (HTTPS)
- Config mounted from `/var/nginx/conf/` on host
- SSL: Let's Encrypt certs via `run_certbot.sh`, dhparam at `/var/dh_param/`
@@ -81,14 +93,16 @@ Each stack has its own Docker network. Nginx joins all of them to reverse proxy:
- `git-network` — git-server + cgit + gerrit + nginx
- `ghost_network` — ghost + ghost-db + nginx
- `jenkins_network` — jenkins + git-server + gerrit + nginx
+- `nexus_network` — nexus + nginx
## Startup Order
1. Portainer (standalone)
2. Git Server (creates git-network)
3. Ghost (creates ghost_network)
4. Jenkins (creates jenkins_network)
-5. Gerrit (joins git-network + jenkins_network, both must exist)
-6. Nginx (joins all networks, must be last)
+5. Nexus (creates nexus_network)
+6. Gerrit (joins git-network + jenkins_network, both must exist)
+7. Nginx (joins all networks, must be last)
## Key Files
- `doc/setup-guide.md` — full build instructions from fresh Debian
@@ -97,6 +111,8 @@ Each stack has its own Docker network. Nginx joins all of them to reverse proxy:
- `doc/jenkins-cpp-build.md` — guide for building C++ apps in Jenkins with Docker agent
- `jenkins/kernel-builder/Dockerfile` — custom Docker image for building the Linux kernel
- `jenkins/init.groovy.d/clear-stuck-builds.groovy` — startup script to clean stuck pipeline executions
+- `nexus/docker-compose.yaml` — Nexus Repository Manager + Docker registry
+- `doc/Jenkinsfile.nexus-example` — example pipelines for uploading artifacts and Docker images to Nexus
- `ghost/.env.example` — template for Ghost env vars
- `doc/git-performance.md` — git server performance tuning guide
- `nginx/error-pages/unknown-host.html` — 404 page for unknown subdomains
@@ -113,5 +129,5 @@ Each stack has its own Docker network. Nginx joins all of them to reverse proxy:
- Automatic certificate renewal for Let's Encrypt
- Better organization of nginx configs (split per service?)
- ~~Cgit web interface for git repos~~ (done)
-- Nexus (mentioned in Readme but not yet set up)
+- ~~Nexus~~ (done)
- Firewall rules (allow only 80, 443, 22, 8080, 8000, 9000, 9418, 50000)