claude/heroku-clone-mvp-plan-NREhc #1

Merged
sander merged 42 commits from claude/heroku-clone-mvp-plan-NREhc into main 2026-03-29 07:24:40 +00:00
3 changed files with 34 additions and 0 deletions
Showing only changes of commit b6e223291a - Show all commits

View file

@ -11,3 +11,7 @@ HIY_ADMIN_PASS=changeme
# Postgres admin password — used by the shared cluster. # Postgres admin password — used by the shared cluster.
# App schemas get their own scoped users; this password never leaves the server. # App schemas get their own scoped users; this password never leaves the server.
POSTGRES_PASSWORD=changeme POSTGRES_PASSWORD=changeme
# Forgejo (optional — only needed if you add the forgejo service to docker-compose.yml).
FORGEJO_DB_PASSWORD=changeme
FORGEJO_DOMAIN=git.yourdomain.com

View file

@ -70,6 +70,30 @@ services:
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD} POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
volumes: volumes:
- hiy-pg-data:/var/lib/postgresql/data - hiy-pg-data:/var/lib/postgresql/data
# SQL files here run once on first init (ignored if data volume already exists).
- ./postgres-init:/docker-entrypoint-initdb.d:ro
networks:
- hiy-net
# ── Forgejo (self-hosted Git) ──────────────────────────────────────────────
forgejo:
image: docker.io/codeberg.org/forgejo/forgejo:10
restart: unless-stopped
environment:
USER_UID: 1000
USER_GID: 1000
FORGEJO__database__DB_TYPE: postgres
FORGEJO__database__HOST: postgres:5432
FORGEJO__database__NAME: forgejo
FORGEJO__database__USER: forgejo
FORGEJO__database__PASSWD: ${FORGEJO_DB_PASSWORD}
FORGEJO__server__DOMAIN: ${FORGEJO_DOMAIN}
FORGEJO__server__ROOT_URL: https://${FORGEJO_DOMAIN}/
FORGEJO__server__SSH_DOMAIN: ${FORGEJO_DOMAIN}
volumes:
- forgejo-data:/data
depends_on:
- postgres
networks: networks:
- hiy-net - hiy-net
@ -142,6 +166,7 @@ networks:
volumes: volumes:
hiy-data: hiy-data:
forgejo-data:
caddy-data: caddy-data:
caddy-config: caddy-config:
hiy-pg-data: hiy-pg-data:

View file

@ -0,0 +1,5 @@
-- Create a dedicated database and user for Forgejo.
-- This script runs once when the Postgres container is first initialised.
-- If the container already has data it is skipped automatically.
CREATE USER forgejo WITH PASSWORD 'CHANGE_ME';
CREATE DATABASE forgejo OWNER forgejo;