From e398b85e2054297512d3d35ba2f92ceb2386daff Mon Sep 17 00:00:00 2001 From: Aiden Gerbrandt Date: Thu, 5 Nov 2026 21:14:56 -0500 Subject: [PATCH] inital commit --- matrix-auth-service.container | 16 ++++++++++++++++ matrix-hookshot.container | 22 ++++++++++++++++++++++ matrix.pod | 23 +++++++++++++++++++++++ mautrix-discord.container | 22 ++++++++++++++++++++++ postgresql.container | 19 +++++++++++++++++++ redis.container | 18 ++++++++++++++++++ synapse.container | 22 ++++++++++++++++++++++ 7 files changed, 142 insertions(+) create mode 100644 matrix-auth-service.container create mode 100644 matrix-hookshot.container create mode 100644 matrix.pod create mode 100644 mautrix-discord.container create mode 100644 postgresql.container create mode 100644 redis.container create mode 100644 synapse.container diff --git a/matrix-auth-service.container b/matrix-auth-service.container new file mode 100644 index 0000000..26d1cc7 --- /dev/null +++ b/matrix-auth-service.container @@ -0,0 +1,16 @@ +[Unit] +Description=Matrix Authentication Service +After=postgresql.service +Requires=postgresql.service + +[Container] +ContainerName=matrix-auth-service +Pod=matrix.pod +Image=ghcr.io/element-hq/matrix-authentication-service:latest +Volume=mas-config:/app/config:ro +EnvironmentFile=./env/matrix-auth-service.env +Label=io.containers.autoupdate=registry +UserNS=keep-id + +[Service] +Restart=always diff --git a/matrix-hookshot.container b/matrix-hookshot.container new file mode 100644 index 0000000..ca5e692 --- /dev/null +++ b/matrix-hookshot.container @@ -0,0 +1,22 @@ +[Unit] +Description=Matrix Webhook endpoint +After=synapse.service +Requires=postgresql.service +Requires=synapse.service + +[Container] +ContainerName=matrix-hookshot +Pod=matrix.pod +Image=ghcr.io/matrix-org/matrix-hookshot:latest +Volume=matrix-hookshot:/data:ro +Volume=matrix-hookshot-crypt:/cryptostore +EnvironmentFile=./env/matrix-hookshot.env +Label=io.containers.autoupdate=registry +UserNS=keep-id + +#HealthCmd=curl http://localhost:29334/_matrix/mau/ready || exit 1 +#HealthInterval=10s +#Notify=healthy + +[Service] +Restart=always diff --git a/matrix.pod b/matrix.pod new file mode 100644 index 0000000..06d2a94 --- /dev/null +++ b/matrix.pod @@ -0,0 +1,23 @@ +[Unit] +Description=Matrix Homeserver stack +After=network-online.target + +[Pod] +PodName=matrix +#Synapse +PublishPort=8008:8008 +#Matrix Hookshot +PublishPort=9993:9993 +PublishPort=9000:9000 +PublishPort=9002:9002 +#Mautrix Discord +PublishPort=29334:29334 +#Matrix Authenitcation Service +PublishPort=8080:8080 +PublishPort=8081:8081 +#Postgresql +#PublishPort=5432:5432 + +[Install] +WantedBy=default.target + diff --git a/mautrix-discord.container b/mautrix-discord.container new file mode 100644 index 0000000..788a9b9 --- /dev/null +++ b/mautrix-discord.container @@ -0,0 +1,22 @@ +[Unit] +Description=Matrix-Discord Bridge +After=synapse.service +Requires=postgresql.service +Requires=synapse.service + +[Container] +ContainerName=mautrix-discord +Pod=matrix.pod +Image=dock.mau.dev/mautrix/discord:latest +Exec=/usr/bin/mautrix-discord --no-update +Volume=mautrix-discord:/data:ro +EnvironmentFile=./env/mautrix-discord.env +Label=io.containers.autoupdate=registry +UserNS=keep-id + +HealthCmd=curl http://localhost:29334/_matrix/mau/ready || exit 1 +HealthInterval=10s +Notify=healthy + +[Service] +Restart=always diff --git a/postgresql.container b/postgresql.container new file mode 100644 index 0000000..e790dc5 --- /dev/null +++ b/postgresql.container @@ -0,0 +1,19 @@ +[Unit] +Description=Postgres Database +After=network-online.target + +[Container] +ContainerName=postgresql +Pod=matrix.pod +Image=docker.io/library/postgres:18 +Volume=postgresql-data:/var/lib/postgresql +EnvironmentFile=./env/postgresql.env +Label=io.containers.autoupdate=registry +UserNS=keep-id + +HealthCmd=pg_isready || exit 1 +HealthInterval=10s +Notify=healthy + +[Service] +Restart=always diff --git a/redis.container b/redis.container new file mode 100644 index 0000000..f00e2ab --- /dev/null +++ b/redis.container @@ -0,0 +1,18 @@ +[Unit] +Description=Redis data caching service +After=network-online.target + +[Container] +ContainerName=redis +Pod=matrix.pod +Image=docker.io/library/redis:latest +EnvironmentFile=./env/redis.env +Label=io.containers.autoupdate=registry +UserNS=keep-id + +HealthCmd=redis-cli --raw incr ping +HealthInterval=10s +Notify=healthy + +[Service] +Restart=always diff --git a/synapse.container b/synapse.container new file mode 100644 index 0000000..4a8f192 --- /dev/null +++ b/synapse.container @@ -0,0 +1,22 @@ +[Unit] +Description=Matrix Homeserver +After=postgresql.service +Requires=postgresql.service + +[Container] +ContainerName=synapse +Pod=matrix.pod +Image=docker.io/matrixdotorg/synapse:latest +Volume=synapse-data:/data +Volume=synapse-config:/config:ro +Volume=synapse-reg:/registration:ro +EnvironmentFile=./env/synapse.env +Label=io.containers.autoupdate=registry +UserNS=keep-id + +HealthCmd=curl http://localhost:8008/health || exit 1 +HealthInterval=10s +Notify=healthy + +[Service] +Restart=always