From 5c89aeb0321a85f659d497efa561b1224157e550 Mon Sep 17 00:00:00 2001 From: Cytrogen Date: Wed, 8 Apr 2026 18:49:54 -0400 Subject: [PATCH] =?UTF-8?q?=E5=88=9D=E5=A7=8B=E5=8C=96=20srht=20=E5=BC=80?= =?UTF-8?q?=E5=8F=91=E7=8E=AF=E5=A2=83=EF=BC=8C=E6=B7=BB=E5=8A=A0=E5=9B=9B?= =?UTF-8?q?=E4=B8=AA=20submodule=20=E5=92=8C=E5=9F=BA=E7=A1=80=E9=85=8D?= =?UTF-8?q?=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 4 ++++ .gitmodules | 12 ++++++++++++ core.sr.ht | 1 + docker-compose.yml | 31 +++++++++++++++++++++++++++++++ git.sr.ht | 1 + init-db.sh | 11 +++++++++++ meta.sr.ht | 1 + scm.sr.ht | 1 + 8 files changed, 62 insertions(+) create mode 100644 .gitignore create mode 100644 .gitmodules create mode 160000 core.sr.ht create mode 100644 docker-compose.yml create mode 160000 git.sr.ht create mode 100755 init-db.sh create mode 160000 meta.sr.ht create mode 160000 scm.sr.ht diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..1b24d0d2a18c6a9aaa8fb79604c496b8c36f469f --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +.venv/ +*.pyc +__pycache__/ +config.ini diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000000000000000000000000000000000000..efdd85178d13f96d5aec89e717be9d55840b5b02 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,12 @@ +[submodule "core.sr.ht"] + path = core.sr.ht + url = https://git.sr.ht/~sircmpwn/core.sr.ht +[submodule "meta.sr.ht"] + path = meta.sr.ht + url = https://git.sr.ht/~sircmpwn/meta.sr.ht +[submodule "git.sr.ht"] + path = git.sr.ht + url = https://git.sr.ht/~sircmpwn/git.sr.ht +[submodule "scm.sr.ht"] + path = scm.sr.ht + url = https://git.sr.ht/~sircmpwn/scm.sr.ht diff --git a/core.sr.ht b/core.sr.ht new file mode 160000 index 0000000000000000000000000000000000000000..44a630f8aa6532815bd7738a1c32f3e25a3b3b68 --- /dev/null +++ b/core.sr.ht @@ -0,0 +1 @@ +Subproject commit 44a630f8aa6532815bd7738a1c32f3e25a3b3b68 diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000000000000000000000000000000000000..3065a55434d817488c1c223e866a46c1ca112ca2 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,31 @@ +services: + postgres: + image: postgres:16-alpine + restart: unless-stopped + environment: + POSTGRES_USER: postgres + POSTGRES_PASSWORD: postgres + ports: + - "127.0.0.1:5432:5432" + volumes: + - postgres_data:/var/lib/postgresql/data + - ./init-db.sh:/docker-entrypoint-initdb.d/init-db.sh + healthcheck: + test: ["CMD-SHELL", "pg_isready -U postgres"] + interval: 10s + timeout: 5s + retries: 5 + + redis: + image: redis:7-alpine + restart: unless-stopped + ports: + - "127.0.0.1:6379:6379" + healthcheck: + test: ["CMD", "redis-cli", "ping"] + interval: 10s + timeout: 5s + retries: 5 + +volumes: + postgres_data: diff --git a/git.sr.ht b/git.sr.ht new file mode 160000 index 0000000000000000000000000000000000000000..493e9470b9eec0f2c9dc5912434560eff9d5341d --- /dev/null +++ b/git.sr.ht @@ -0,0 +1 @@ +Subproject commit 493e9470b9eec0f2c9dc5912434560eff9d5341d diff --git a/init-db.sh b/init-db.sh new file mode 100755 index 0000000000000000000000000000000000000000..6e12c8ef809aae61ff78f4d623dcb667d31ce5ac --- /dev/null +++ b/init-db.sh @@ -0,0 +1,11 @@ +#!/bin/bash +set -e + +for db in metasrht gitsrht; do + psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" <<-EOSQL + CREATE DATABASE $db; + CREATE USER $db WITH PASSWORD '$db'; + GRANT ALL PRIVILEGES ON DATABASE $db TO $db; + ALTER DATABASE $db OWNER TO $db; +EOSQL +done diff --git a/meta.sr.ht b/meta.sr.ht new file mode 160000 index 0000000000000000000000000000000000000000..7fc93e4f0f807a5211f95ec855e425c66f1aa022 --- /dev/null +++ b/meta.sr.ht @@ -0,0 +1 @@ +Subproject commit 7fc93e4f0f807a5211f95ec855e425c66f1aa022 diff --git a/scm.sr.ht b/scm.sr.ht new file mode 160000 index 0000000000000000000000000000000000000000..07aa1944a2c6fefafd6dcf511d6819a64425e80b --- /dev/null +++ b/scm.sr.ht @@ -0,0 +1 @@ +Subproject commit 07aa1944a2c6fefafd6dcf511d6819a64425e80b