OPC # 0003: Move Gitea out of OPC Aspire Orchestration

This commit is contained in:
amadzarak
2026-04-25 22:51:03 -04:00
parent 5009f6e688
commit 7e360749b9
4 changed files with 49 additions and 22 deletions
+33
View File
@@ -20,6 +20,8 @@ networks:
volumes:
postgres-data:
minio-data:
clarity-gitea-data:
external: true
services:
@@ -154,6 +156,37 @@ services:
aliases:
- nginx
# ── Gitea ─────────────────────────────────────────────────────────────────
# Platform source control. Hosts OPC, Clarity, and Gateway repos.
# Accessible at https://opc.clarity.test (nginx terminates TLS).
gitea:
image: gitea/gitea:latest
container_name: clarity-gitea
restart: unless-stopped
ports:
- "3000:3000"
- "2222:22"
environment:
GITEA__database__DB_TYPE: postgres
GITEA__database__HOST: postgres:5432
GITEA__database__NAME: giteadb
GITEA__database__USER: postgres
GITEA__database__PASSWD: postgres
GITEA__server__DOMAIN: opc.clarity.test
GITEA__server__ROOT_URL: https://opc.clarity.test
GITEA__server__SSH_DOMAIN: opc.clarity.test
GITEA__server__SSH_PORT: "2222"
GITEA__service__DISABLE_REGISTRATION: "true"
volumes:
- clarity-gitea-data:/data
depends_on:
postgres:
condition: service_healthy
networks:
clarity-net:
aliases:
- gitea
# ── Dnsmasq ───────────────────────────────────────────────────────────────
# Resolves *.clarity.test → 127.0.0.1 so browser requests hit nginx on the host.
dnsmasq:
+15
View File
@@ -0,0 +1,15 @@
server {
listen 443 ssl;
server_name opc.clarity.test;
ssl_certificate /etc/nginx/certs/clarity.test.crt;
ssl_certificate_key /etc/nginx/certs/clarity.test.key;
location / {
proxy_pass http://gitea:3000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}
+1
View File
@@ -7,3 +7,4 @@
-- clarity_{tenant} → Created at provisioning time by ControlPlane.Worker.
SELECT 'CREATE DATABASE keycloakdb' WHERE NOT EXISTS (SELECT FROM pg_database WHERE datname = 'keycloakdb')\gexec
SELECT 'CREATE DATABASE giteadb' WHERE NOT EXISTS (SELECT FROM pg_database WHERE datname = 'giteadb')\gexec