Fixed formatting
This commit is contained in:
parent
80053a8de3
commit
5d143db547
|
|
@ -1,118 +1,116 @@
|
||||||
captainVersion: 4
|
captainVersion: 4
|
||||||
services:
|
services:
|
||||||
$$cap_appname-db:
|
$$cap_appname-db:
|
||||||
image: postgres:$$cap_postgres_version
|
image: postgres:$$cap_postgres_version
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
environment:
|
environment:
|
||||||
POSTGRES_DB: synapse_db
|
POSTGRES_DB: synapse_db
|
||||||
POSTGRES_PASSWORD: $$cap_db_password
|
POSTGRES_PASSWORD: $$cap_db_password
|
||||||
POSTGRES_USER: synapse_user
|
POSTGRES_USER: synapse_user
|
||||||
POSTGRES_INITDB_ARGS: --encoding='UTF8' --lc-collate='C' --lc-ctype='C'
|
POSTGRES_INITDB_ARGS: --encoding='UTF8' --lc-collate='C' --lc-ctype='C'
|
||||||
volumes:
|
volumes:
|
||||||
- $$cap_appname-db:/var/lib/postgresql/data
|
- $$cap_appname-db:/var/lib/postgresql/data
|
||||||
caproverExtra:
|
caproverExtra:
|
||||||
notExposeAsWebApp: true
|
notExposeAsWebApp: true
|
||||||
|
|
||||||
$$cap_appname:
|
|
||||||
restart: unless-stopped
|
|
||||||
environment:
|
|
||||||
TZ: $$cap_time_zone
|
|
||||||
volumes:
|
|
||||||
- $$cap_appname-data:/data
|
|
||||||
caproverExtra:
|
|
||||||
containerHttpPort: '8008'
|
|
||||||
dockerfileLines:
|
|
||||||
- FROM matrixdotorg/synapse:$$cap_synapse_version
|
|
||||||
- RUN mkdir /data/
|
|
||||||
- ENV SYNAPSE_SERVER_NAME=$$cap_appname.$$cap_root_domain
|
|
||||||
- ENV SYNAPSE_REPORT_STATS=$$cap_synapse_stats
|
|
||||||
- RUN /start.py generate
|
|
||||||
- RUN echo '\nserve_server_wellknown\072 true' >> /data/homeserver.yaml
|
|
||||||
- RUN echo "\nenable_registration\072 $$cap_enable_registration \nenable_registration_without_verification\072 true" >> /data/homeserver.yaml
|
|
||||||
- RUN echo "\nmax_upload_size\072 $$cap_max_upload_sizeM" >> /data/homeserver.yaml
|
|
||||||
- RUN sed -i '/^server_name.*/a public_baseurl\o072 "https://$$cap_appname.$$cap_root_domain"' /data/homeserver.yaml
|
|
||||||
- RUN sed -i 's/name\o072 sqlite3/name\o072 psycopg2/g' /data/homeserver.yaml
|
|
||||||
- RUN sed -i 's/database\o072 .*homeserver\.db/database\o072 synapse_db\n user\o072 synapse_user\n password\o072 $$cap_db_password\n host\o072 srv-captain--$$cap_appname-db\n port\o072 5432\n/g' /data/homeserver.yaml
|
|
||||||
|
|
||||||
|
|
||||||
|
$$cap_appname:
|
||||||
|
restart: unless-stopped
|
||||||
|
environment:
|
||||||
|
TZ: $$cap_time_zone
|
||||||
|
volumes:
|
||||||
|
- $$cap_appname-data:/data
|
||||||
|
caproverExtra:
|
||||||
|
containerHttpPort: '8008'
|
||||||
|
dockerfileLines:
|
||||||
|
- FROM matrixdotorg/synapse:$$cap_synapse_version
|
||||||
|
- RUN mkdir /data/
|
||||||
|
- ENV SYNAPSE_SERVER_NAME=$$cap_appname.$$cap_root_domain
|
||||||
|
- ENV SYNAPSE_REPORT_STATS=$$cap_synapse_stats
|
||||||
|
- RUN /start.py generate
|
||||||
|
- RUN echo '\nserve_server_wellknown\072 true' >> /data/homeserver.yaml
|
||||||
|
- RUN echo "\nenable_registration\072 $$cap_enable_registration \nenable_registration_without_verification\072 true" >> /data/homeserver.yaml
|
||||||
|
- RUN echo "\nmax_upload_size\072 $$cap_max_upload_sizeM" >> /data/homeserver.yaml
|
||||||
|
- RUN sed -i '/^server_name.*/a public_baseurl\o072 "https://$$cap_appname.$$cap_root_domain"' /data/homeserver.yaml
|
||||||
|
- RUN sed -i 's/name\o072 sqlite3/name\o072 psycopg2/g' /data/homeserver.yaml
|
||||||
|
- RUN sed -i 's/database\o072 .*homeserver\.db/database\o072 synapse_db\n user\o072 synapse_user\n password\o072 $$cap_db_password\n host\o072 srv-captain--$$cap_appname-db\n port\o072 5432\n/g' /data/homeserver.yaml
|
||||||
|
|
||||||
caproverOneClickApp:
|
caproverOneClickApp:
|
||||||
variables:
|
variables:
|
||||||
- id: '$$cap_synapse_version'
|
- id: '$$cap_synapse_version'
|
||||||
label: Synapse Version
|
label: Synapse Version
|
||||||
defaultValue: 'v1.63.1'
|
defaultValue: 'v1.63.1'
|
||||||
description: Check out their Docker page for the valid tags https://hub.docker.com/r/matrixdotorg/synapse/tags
|
description: Check out their Docker page for the valid tags https://hub.docker.com/r/matrixdotorg/synapse/tags
|
||||||
validRegex: '/^v[0-9]{1,}|latest$/'
|
validRegex: '/^v[0-9]{1,}|latest$/'
|
||||||
- id: '$$cap_time_zone'
|
- id: '$$cap_time_zone'
|
||||||
label: Time zone
|
label: Time zone
|
||||||
defaultValue: Europe/Berlin
|
defaultValue: Europe/Berlin
|
||||||
description: The time zone of your server https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
|
description: The time zone of your server https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
|
||||||
validRegex: '/.{1,}/'
|
validRegex: '/.{1,}/'
|
||||||
- id: '$$cap_synapse_stats'
|
- id: '$$cap_synapse_stats'
|
||||||
label: Report stats
|
label: Report stats
|
||||||
defaultValue: 'no'
|
defaultValue: 'no'
|
||||||
description: 'Report stats'
|
description: 'Report stats'
|
||||||
validRegex: '/^(yes|no)$/i'
|
validRegex: '/^(yes|no)$/i'
|
||||||
- id: '$$cap_enable_registration'
|
- id: '$$cap_enable_registration'
|
||||||
label: Enable public registration
|
label: Enable public registration
|
||||||
defaultValue: 'false'
|
defaultValue: 'false'
|
||||||
description: >-
|
description: >-
|
||||||
Set this to true if you want EVERYONE to be able to register.
|
Set this to true if you want EVERYONE to be able to register.
|
||||||
It's recommended to set this to false and create users manually.
|
It's recommended to set this to false and create users manually.
|
||||||
validRegex: '/^(true|false)$/i'
|
validRegex: '/^(true|false)$/i'
|
||||||
- id: '$$cap_max_upload_size'
|
- id: '$$cap_max_upload_size'
|
||||||
label: Max upload size
|
label: Max upload size
|
||||||
defaultValue: '300'
|
defaultValue: '300'
|
||||||
description: >-
|
description: >-
|
||||||
The maximum size of a file that can be uploaded, in megabytes.
|
The maximum size of a file that can be uploaded, in megabytes.
|
||||||
|
|
||||||
If you set this higher than 500, you will will also need to increase the nginx "client_max_body_size".
|
If you set this higher than 500, you will will also need to increase the nginx "client_max_body_size".
|
||||||
validRegex: '/^[0-9]{1,}$/'
|
validRegex: '/^[0-9]{1,}$/'
|
||||||
- id: '$$cap_postgres_version'
|
- id: '$$cap_postgres_version'
|
||||||
label: Postgres version
|
label: Postgres version
|
||||||
defaultValue: '14'
|
defaultValue: '14'
|
||||||
description: >-
|
description: >-
|
||||||
The version of postgres that you want to use.
|
The version of postgres that you want to use.
|
||||||
You can find the valid versions here: https://hub.docker.com/r/postgres/postgres/tags
|
You can find the valid versions here: https://hub.docker.com/r/postgres/postgres/tags
|
||||||
validRegex: '/^[0-9]{1,}|latest$/'
|
validRegex: '/^[0-9]{1,}|latest$/'
|
||||||
- id: '$$cap_db_password'
|
- id: '$$cap_db_password'
|
||||||
label: Database password
|
label: Database password
|
||||||
defaultValue: $$cap_gen_random_hex(20)
|
defaultValue: $$cap_gen_random_hex(20)
|
||||||
description: >-
|
description: >-
|
||||||
The password for the Synapse database.
|
The password for the Synapse database.
|
||||||
validRegex: '/^[0-9a-zA-Z]{1,}$/'
|
validRegex: '/^[0-9a-zA-Z]{1,}$/'
|
||||||
instructions:
|
instructions:
|
||||||
start: >-
|
start: >-
|
||||||
Synapse is a server implementation of the matrix protocol that allows you to host your own messaging server.
|
Synapse is a server implementation of the matrix protocol that allows you to host your own messaging server.
|
||||||
|
|
||||||
Matrix is build to federate with other servers, so you can communicate with people from other servers.
|
Matrix is build to federate with other servers, so you can communicate with people from other servers.
|
||||||
|
|
||||||
More information about matrix can be found here: https://matrix.org/
|
More information about matrix can be found here: https://matrix.org/
|
||||||
end: >-
|
end: >-
|
||||||
Almost done.
|
Almost done.
|
||||||
|
|
||||||
Enable and force https in the web interface
|
Enable and force https in the web interface
|
||||||
|
|
||||||
Wait 30 seconds, go to https://$$cap_appname.$$cap_root_domain and should be able to see "It works! Synapse is running"
|
Wait 30 seconds, go to https://$$cap_appname.$$cap_root_domain and should be able to see "It works! Synapse is running"
|
||||||
|
|
||||||
$$cap_appname.$$cap_root_domain is the domain you enter in the custom homeserver field of your client
|
$$cap_appname.$$cap_root_domain is the domain you enter in the custom homeserver field of your client
|
||||||
|
|
||||||
Remember this is just the server, you also need a client like https://app.element.io/ to use this app.
|
Remember this is just the server, you also need a client like https://app.element.io/ to use this app.
|
||||||
|
|
||||||
|
|
||||||
If you set public registration to false, you can create new users with the following command:
|
If you set public registration to false, you can create new users with the following command:
|
||||||
|
|
||||||
sudo docker exec -it $(sudo docker ps | grep -o srv-captain--$$cap_appname.*) register_new_matrix_user http://localhost:8008 -c /data/homeserver.yaml
|
sudo docker exec -it $(sudo docker ps | grep -o srv-captain--$$cap_appname.*) register_new_matrix_user http://localhost:8008 -c /data/homeserver.yaml
|
||||||
|
|
||||||
|
|
||||||
You can always change the config file located in /var/lib/docker/volumes/srv-captain--$$cap_appname-data/_data/homeserver.yaml
|
You can always change the config file located in /var/lib/docker/volumes/srv-captain--$$cap_appname-data/_data/homeserver.yaml
|
||||||
|
|
||||||
|
|
||||||
link to the the configuration manual: https://matrix-org.github.io/synapse/latest/usage/configuration/config_documentation.html
|
link to the the configuration manual: https://matrix-org.github.io/synapse/latest/usage/configuration/config_documentation.html
|
||||||
|
|
||||||
after a change restart the container by clicking "Save & Update"
|
after a change restart the container by clicking "Save & Update"
|
||||||
|
|
||||||
displayName: Matrix Synapse
|
displayName: Matrix Synapse
|
||||||
isOfficial: true
|
isOfficial: true
|
||||||
description: Server for the matrix protocol
|
description: Server for the matrix protocol
|
||||||
documentation: https://github.com/matrix-org/synapse/tree/develop/docker
|
documentation: https://github.com/matrix-org/synapse/tree/develop/docker
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue