scaffold: hub-and-spoke layout, 4-network topology, 13 stack stubs
Initial structure for R&D infrastructure:
- stacks/ — 13 reusable, runnable stack stubs (kebab-case)
cloud-and-edge: node-red, influxdb, grafana, keycloak, portainer,
nginx-proxy, mqtt, postfix
cloud-only: wireguard-server, gitea, jenkins, sql (postgres stub)
edge-only: wireguard-client
- cloud/ — single central hub composition with 4 networks
(edge, app, data internal, mgmt) and include: stubs
- sites/ — per-plant edge folders (template README only for now)
- docs/architecture.md — hub-and-spoke + ingress + segmentation rationale
Network model: only nginx-proxy (80/443/8883) and wireguard-server
(51820/udp) publish ports on the cloud host. Edge nginx publishes
80/443 on plant-LAN interface only. MQTT cloud-side via nginx stream
proxy; MQTT edge-side internal-only; Postfix outbound-only.
OT layer (OPCUA, PLCs) is out of scope for this repo.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
6
stacks/gitea/.env.example
Normal file
6
stacks/gitea/.env.example
Normal file
@@ -0,0 +1,6 @@
|
||||
GITEA_ROOT_URL=
|
||||
GITEA_DB_TYPE=postgres
|
||||
GITEA_DB_HOST=sql:5432
|
||||
GITEA_DB_NAME=gitea
|
||||
GITEA_DB_USER=gitea
|
||||
GITEA_DB_PASSWORD=
|
||||
7
stacks/gitea/README.md
Normal file
7
stacks/gitea/README.md
Normal file
@@ -0,0 +1,7 @@
|
||||
# gitea
|
||||
|
||||
Self-hosted git server. **Cloud-only stack.** (External repos live at `gitea.wbd-rd.nl`; this is for R&D internal use.)
|
||||
|
||||
- **Networks**: `app` (UI) + `data` (DB backend in `sql` stack)
|
||||
- **Volume**: `gitea-data` (repos + LFS + actions runners)
|
||||
- **TODO**: SSH access strategy (nginx stream proxy port 22, or skip and use HTTPS-only), Keycloak OIDC, runners for Gitea Actions
|
||||
28
stacks/gitea/compose.yml
Normal file
28
stacks/gitea/compose.yml
Normal file
@@ -0,0 +1,28 @@
|
||||
# gitea — git server (cloud only)
|
||||
# Networks: app + data (uses sql stack as DB backend)
|
||||
|
||||
services:
|
||||
gitea:
|
||||
image: gitea/gitea:1.22
|
||||
restart: unless-stopped
|
||||
networks: [app, data]
|
||||
environment:
|
||||
USER_UID: "1000"
|
||||
USER_GID: "1000"
|
||||
GITEA__server__ROOT_URL: ${GITEA_ROOT_URL}
|
||||
GITEA__database__DB_TYPE: ${GITEA_DB_TYPE:-postgres}
|
||||
GITEA__database__HOST: ${GITEA_DB_HOST:-sql:5432}
|
||||
GITEA__database__NAME: ${GITEA_DB_NAME:-gitea}
|
||||
GITEA__database__USER: ${GITEA_DB_USER}
|
||||
GITEA__database__PASSWD: ${GITEA_DB_PASSWORD}
|
||||
TZ: ${TZ:-Europe/Amsterdam}
|
||||
volumes:
|
||||
- gitea-data:/data
|
||||
# SSH port: TODO — decide if Gitea SSH (22/2222) is exposed via nginx stream or skipped
|
||||
|
||||
networks:
|
||||
app:
|
||||
data:
|
||||
|
||||
volumes:
|
||||
gitea-data:
|
||||
Reference in New Issue
Block a user