mirror of
https://github.com/CoolnsX/selfhost_podman.git
synced 2025-12-20 03:45:16 +05:30
Feat: matrix, gitea, ntfy, headscale, collabora
This commit is contained in:
21
matrix/element.container
Normal file
21
matrix/element.container
Normal file
@@ -0,0 +1,21 @@
|
||||
[Unit]
|
||||
Description=Element Container
|
||||
|
||||
[Container]
|
||||
ContainerName=element
|
||||
Image=docker.io/vectorim/element-web:latest
|
||||
|
||||
# Enable auto-update container
|
||||
AutoUpdate=registry
|
||||
PublishPort=8089:80
|
||||
Sysctl=net.ipv4.ip_unprivileged_port_start=80
|
||||
|
||||
Volume=./element-config.json:/app/config.json
|
||||
|
||||
[Service]
|
||||
Restart=always
|
||||
TimeoutStartSec=300
|
||||
|
||||
[Install]
|
||||
WantedBy=default.target
|
||||
|
||||
9
matrix/env.example
Normal file
9
matrix/env.example
Normal file
@@ -0,0 +1,9 @@
|
||||
POSTGRES_USER="synapse"
|
||||
POSTGRES_DATABASE="synapse"
|
||||
POSTGRES_PASSWORD=""
|
||||
PUID=1000
|
||||
PGID=1000
|
||||
DATABASE_DIR="./database"
|
||||
ELEMENT_CONFIG_JSON="./element-config.json"
|
||||
TZ=etc/UTC
|
||||
SYNAPSE_SERVER_NAME=example.com
|
||||
36
matrix/synapse.container
Normal file
36
matrix/synapse.container
Normal file
@@ -0,0 +1,36 @@
|
||||
[Unit]
|
||||
Description=Synapse Container
|
||||
Requires=nginx-proxy.service synapse_db.service
|
||||
After=nginx-proxy.service synapse_db.service
|
||||
|
||||
[Container]
|
||||
Pod=nginx-proxy.pod
|
||||
ContainerName=synapse
|
||||
Image=docker.io/matrixdotorg/synapse:latest
|
||||
|
||||
# Enable auto-update container
|
||||
AutoUpdate=registry
|
||||
# pass this to attach it to container
|
||||
Environment=SYNAPSE_CONFIG_PATH=/data/homeserver.yaml
|
||||
Environment=SYNAPSE_SERVER_NAME=${SYNAPSE_SERVER_NAME}
|
||||
Environment=SYNAPSE_REPORT_STATS=yes
|
||||
Environment=POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
|
||||
Environment=POSTGRES_USER=${POSTGRES_USER}
|
||||
Environment=POSTGRES_DB=${POSTGRES_DATABASE}
|
||||
Environment=POSTGRES_HOST=/tmp/matrix
|
||||
Environment=UID=0
|
||||
Environment=GID=0
|
||||
Environment=TZ=${TZ}
|
||||
|
||||
Volume=%h/podman/matrix/synapse:/data
|
||||
Volume=%h/podman/matrix/.socket:/tmp/matrix
|
||||
|
||||
[Service]
|
||||
# pass this to autofill above variables
|
||||
EnvironmentFile=%h/.config/containers/systemd/matrix/.env
|
||||
Restart=always
|
||||
TimeoutStartSec=300
|
||||
|
||||
[Install]
|
||||
WantedBy=default.target
|
||||
|
||||
28
matrix/synapse_db.container
Normal file
28
matrix/synapse_db.container
Normal file
@@ -0,0 +1,28 @@
|
||||
[Unit]
|
||||
Description=Synapse Database Container
|
||||
|
||||
[Container]
|
||||
Pod=nginx-proxy.pod
|
||||
ContainerName=synapse_db
|
||||
Image=docker.io/library/postgres:alpine
|
||||
Exec=postgres -c unix_socket_directories='/var/run/postgresql/,/tmp/matrix/' -c unix_socket_permissions=0770
|
||||
|
||||
# Enable auto-update container
|
||||
AutoUpdate=registry
|
||||
# pass this to attach it to container
|
||||
Environment=POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
|
||||
Environment=POSTGRES_USER=${POSTGRES_USER}
|
||||
Environment=POSTGRES_INITDB_ARGS=--encoding=UTF-8 --lc-collate=C --lc-ctype=C
|
||||
|
||||
Volume=%h/podman/matrix/database:/var/lib/postgresql/data
|
||||
Volume=%h/podman/matrix/.socket:/tmp/matrix
|
||||
|
||||
[Service]
|
||||
# pass this to autofill above variables
|
||||
EnvironmentFile=%h/.config/containers/systemd/matrix/.env
|
||||
Restart=always
|
||||
TimeoutStartSec=300
|
||||
|
||||
[Install]
|
||||
WantedBy=default.target
|
||||
|
||||
Reference in New Issue
Block a user