Add conduit to stack

This commit is contained in:
Phil 2025-02-28 12:24:23 -07:00
parent d43f70b68f
commit d2d0accd2c
8 changed files with 100 additions and 1 deletions

View File

@ -37,6 +37,8 @@
ip: "152.53.36.98" ip: "152.53.36.98"
- name: watcher - name: watcher
ip: "152.53.36.98" ip: "152.53.36.98"
- name: chat
ip: "152.53.36.98"
- name: nerder.land - name: nerder.land
dns_records: dns_records:
- name: "forms" - name: "forms"

View File

@ -67,6 +67,15 @@ thesatelliteoflove.com {
file_server file_server
} }
chat.thesatelliteoflove.com, chat.thesatelliteoflove.com:8448 {
handle /.well-known/* {
root * /srv/matrix
file_server
}
reverse_proxy /_matrix/* conduit-homeserver-1:6167
}
bookmarks.thesatelliteoflove.com { bookmarks.thesatelliteoflove.com {
reverse_proxy hoarder-web-1:3000 reverse_proxy hoarder-web-1:3000
} }

View File

@ -6,6 +6,8 @@ services:
- "80:80" - "80:80"
- "443:443" - "443:443"
- "443:443/udp" - "443:443/udp"
- "8448:8448"
- "8448:8448/udp"
volumes: volumes:
- ./Caddyfile:/etc/caddy/Caddyfile - ./Caddyfile:/etc/caddy/Caddyfile
- ./site:/srv - ./site:/srv

View File

@ -0,0 +1,5 @@
{
"m.homeserver": {
"base_url": "https://chat.thesatelliteoflove.com"
}
}

View File

@ -0,0 +1,3 @@
{
"m.server": "chat.thesatelliteoflove.com:443"
}

View File

@ -0,0 +1,29 @@
- name: make conduit directories
ansible.builtin.file:
path: "{{ item}}"
state: directory
loop:
- /opt/stacks/conduit
- name: copy well-known files
ansible.builtin.copy:
src: "{{item}}"
dest: /opt/stacks/caddy/site/matrix/
owner: root
mode: 644
loop:
- client
- server
- name: Template out the compose file
ansible.builtin.template:
src: conduit-compose.yml.j2
dest: /opt/stacks/conduit/compose.yml
owner: root
mode: 644
- name: deploy conduit stack
community.docker.docker_compose_v2:
project_src: /opt/stacks/conduit
files:
- compose.yml

View File

@ -153,3 +153,6 @@
- name: Install changedetection - name: Install changedetection
import_tasks: changedetection.yml import_tasks: changedetection.yml
tags: changedetection tags: changedetection
- name: Install conduit
import_tasks: conduit.yml
tags: conduit

View File

@ -0,0 +1,46 @@
services:
homeserver:
image: matrixconduit/matrix-conduit:next
restart: unless-stopped
volumes:
- db:/var/lib/matrix-conduit/
labels:
glance.name: Conduit
glance.icon: si:matrix
glance.url: https://chat.thesatelliteoflove.com/
glance.description: Matrix server
environment:
CONDUIT_SERVER_NAME: chat.thesatelliteoflove.com # EDIT THIS
CONDUIT_DATABASE_PATH: /var/lib/matrix-conduit/
CONDUIT_DATABASE_BACKEND: rocksdb
CONDUIT_PORT: 6167
CONDUIT_MAX_REQUEST_SIZE: 20000000 # in bytes, ~20 MB
CONDUIT_ALLOW_REGISTRATION: 'true'
CONDUIT_ALLOW_FEDERATION: 'true'
CONDUIT_ALLOW_CHECK_FOR_UPDATES: 'true'
CONDUIT_TRUSTED_SERVERS: '["matrix.org"]'
#CONDUIT_MAX_CONCURRENT_REQUESTS: 100
CONDUIT_ADDRESS: 0.0.0.0
CONDUIT_CONFIG: '' # Ignore this
#
### Uncomment if you want to use your own Element-Web App.
### Note: You need to provide a config.json for Element and you also need a second
### Domain or Subdomain for the communication between Element and Conduit
### Config-Docs: https://github.com/vector-im/element-web/blob/develop/docs/config.md
# element-web:
# image: vectorim/element-web:latest
# restart: unless-stopped
# ports:
# - 8009:80
# volumes:
# - ./element_config.json:/app/config.json
# depends_on:
# - homeserver
volumes:
db:
networks:
default:
external: true
name: lava