Compare commits

...

11 Commits

4 changed files with 69 additions and 7 deletions

View File

@@ -17,6 +17,15 @@ ansible-playbook deploy_matrix.yml -i inventory/hosts.yml
## Matrix Administration ##
[synapse-admin on github](https://github.com/Awesome-Technologies/synapse-admin)
- generate new certificate
```
podman run -it --rm \
-v ~/synapse-data:/data:Z \
-e SYNAPSE_SERVER_NAME=matrix.fpov.space \
-e SYNAPSE_REPORT_STATS=no \
matrixdotorg/synapse:latest generate
```
- Create User
```
sudo podman exec -it synapse register_new_matrix_user -c /data/homeserver.yaml http://localhost:8008

View File

@@ -39,10 +39,11 @@
- "{{ vol_db }}"
- "{{ npm_data }}"
- "{{ npm_letsencrypt }}"
- "{{ lemonldap_data }}"
- "{{ keycloak_data }}"
- "{{ vol_kc_db }}"
# -----------------------------------------------------------------
# Pull required images (including Teamspeak)
# Pull required images
# -----------------------------------------------------------------
- name: Pull coturn image
@@ -186,7 +187,7 @@
ports:
- "{{ synapse_http_port }}:{{ synapse_http_port }}"
volumes:
- "{{ vol_synapse }}:/data"
- "{{ vol_synapse }}:/data:Z"
- "{{ vol_media }}:/data/media_store:Z"
- "{{ synapse_cfg_path }}:/data/homeserver.yaml:Z"
- "{{ synapse_secret_key_path }}:/data/matrix.fpov.space.signing.key:Z"
@@ -244,4 +245,42 @@
network: "{{ podman_network }}"
restart_policy: always
# -----------------------------------------------------------------
# Start Keyclaok and supporting DB containers
# -----------------------------------------------------------------
- name: start Keyclaok Database container
containers.podman.podman_container:
name: keycloak-db
image: "{{ db_image }}"
state: started
env:
POSTGRES_USER: "{{ keycloak_postgres_user }}"
POSTGRES_PASSWORD: "{{ keycloak_postgres_pw }}"
POSTGRES_DB: "{{ keycloak_db }}"
volumes:
- "{{ vol_kc_db }}:/var/lib/postgresql/data"
network: "{{ podman_network }}"
restart_policy: always
- name: Start Keycloak authentication container
containers.podman.podman_container:
name: "{{ keycloak_container_name }}"
image: "{{ keycloak_image }}"
command: ["start-dev"]
env:
KC_DB: postgres
KC_DB_URL: jdbc:postgresql://keycloak-db/{{ keycloak_db }}
KC_DB_USERNAME: "{{ keycloak_postgres_user }}"
KC_DB_PASSWORD: "{{ keycloak_postgres_pw }}"
KC_HOSTNAME: "{{ keycloak_domain }}"
KC_HOSTNAME_PORT: "{{ kc_hn_port }}"
KEYCLOAK_ADMIN: "{{ keycloak_admin }}"
KC_BOOTSTRAP_ADMIN_PASSWORD: "{{ keycloak_pw }}"
KC_PROXY_HEADERS: xforwarded
KC_HTTP_ENABLED: "true"
KC_HOSTNAME_STRICT: "{{ 'false' }}"
volumes:
- "{{ keycloak_data }}:/opt/keycloak/data:Z"
network: "{{ podman_network }}"
restart_policy: always

View File

@@ -33,8 +33,7 @@ registration_requires_token: true
federation_domain_whitelist: []
auto_join_rooms:
- "#star-citizen:matrix.fpov.space"
- "#welcome:matrix.fpov.space"
- "#general:matrix.fpov.space"
max_upload_size: 200M

View File

@@ -10,6 +10,7 @@ turn_domain: "turn.fpov.space"
matrix_email: "boxswappers@gmail.com"
admin_domain: "mtxadm.fpov.space"
element_domain: "element.fpov.space"
keycloak_domain: "auth.fpov.space"
# --------------------------------------------------------------
# Ports
@@ -44,6 +45,10 @@ postgres_db: synapse
postgres_user: mMwHLfdO6tz5N
postgres_pw: 9mKeSFE7tH2eY
keycloak_db: keycloak
keycloak_postgres_user: wCdfpLp3j208
keycloak_postgres_pw: F7C3arx1ZGHh
# --------------------------------------------------------------
# Container images
# --------------------------------------------------------------
@@ -71,6 +76,9 @@ vol_teamspeak: teamspeak_data
npm_data: npm_data
npm_letsencrypt: letsencrypt
vol_db: postgres_db
vol_kc_db: kc_postgres
keycloak_data: kc_data
# --------------------------------------------------------------
# Paths on the target host (temporary files)
@@ -80,7 +88,7 @@ dynamic_traefik_path: "/tmp/traefik_dynamic.yml"
turn_conf_path: "/tmp/turnserver.conf"
synapse_cfg_path: "/tmp/homeserver.yaml"
nginx_html_path: "/tmp/index.html"
synapse_secret_key_path: "/tmp/matrix.fpov.space.signing.key"
synapse_secret_key_path: "/opt/matrix.fpov.space.signing.key"
synapse_log_config: "/tmp/matrix.fpov.space.log.config"
element_config_path: "/tmp/config.json"
@@ -117,3 +125,10 @@ landing_message: |
automatic Let’s Encrypt certificates, a TURN server for voice/video, and a
simple landing page.
# --------------------------------------------------------------
# Keycloak Auth
# --------------------------------------------------------------
kc_hn_port: "8080"
keycloak_admin: "mQ4vN06xWgIQ"
keycloak_pw: "I71bUBkhPY6E"
keycloak_container_name: "keycloak"