command for adding admin user
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
2445d9f33a
commit
d22a8257fb
|
@ -1,7 +1,10 @@
|
||||||
TYPE=matrix-synapse
|
TYPE=matrix-synapse
|
||||||
DOMAIN=matrix.example.com
|
DOMAIN=matrix.example.com
|
||||||
|
TIMEOUT=300
|
||||||
|
ENABLE_AUTO_UPDATE=true
|
||||||
LETS_ENCRYPT_ENV=production
|
LETS_ENCRYPT_ENV=production
|
||||||
COMPOSE_FILE="compose.yml"
|
COMPOSE_FILE="compose.yml"
|
||||||
|
# POST_DEPLOY_CMDS="db set_admin"
|
||||||
|
|
||||||
## Admin details
|
## Admin details
|
||||||
|
|
||||||
|
|
|
@ -24,6 +24,10 @@
|
||||||
|
|
||||||
## Tips & Tricks
|
## Tips & Tricks
|
||||||
|
|
||||||
|
### Set Admin User
|
||||||
|
|
||||||
|
`abra app cmd YOURAPPDOMAIN db set_admin <adminuser>`
|
||||||
|
|
||||||
### Disabling federation
|
### Disabling federation
|
||||||
|
|
||||||
- Use `DISABLE_FEDERATION=1` to turn off federation listeners
|
- Use `DISABLE_FEDERATION=1` to turn off federation listeners
|
||||||
|
|
9
abra.sh
9
abra.sh
|
@ -5,3 +5,12 @@ export LOG_CONFIG_VERSION=v2
|
||||||
export SHARED_SECRET_AUTH_VERSION=v1
|
export SHARED_SECRET_AUTH_VERSION=v1
|
||||||
export SIGNAL_BRIDGE_YAML_VERSION=v4
|
export SIGNAL_BRIDGE_YAML_VERSION=v4
|
||||||
export TELEGRAM_BRIDGE_YAML_VERSION=v6
|
export TELEGRAM_BRIDGE_YAML_VERSION=v6
|
||||||
|
|
||||||
|
set_admin () {
|
||||||
|
admin=akadmin
|
||||||
|
if [ -n "$1" ]
|
||||||
|
then
|
||||||
|
admin=$1
|
||||||
|
fi
|
||||||
|
psql -U synapse -c "UPDATE users SET admin = 1 WHERE name = '@$admin:$DOMAIN'";
|
||||||
|
}
|
||||||
|
|
|
@ -62,6 +62,7 @@ services:
|
||||||
- "traefik.http.routers.${STACK_NAME}.entrypoints=web-secure"
|
- "traefik.http.routers.${STACK_NAME}.entrypoints=web-secure"
|
||||||
- "traefik.http.routers.${STACK_NAME}.tls.certresolver=${LETS_ENCRYPT_ENV}"
|
- "traefik.http.routers.${STACK_NAME}.tls.certresolver=${LETS_ENCRYPT_ENV}"
|
||||||
- "coop-cloud.${STACK_NAME}.version=3.6.0+v1.81.0"
|
- "coop-cloud.${STACK_NAME}.version=3.6.0+v1.81.0"
|
||||||
|
- "coop-cloud.${STACK_NAME}.timeout=${TIMEOUT:-120}"
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ["CMD", "curl", "-f", "http://localhost:8008/health"]
|
test: ["CMD", "curl", "-f", "http://localhost:8008/health"]
|
||||||
interval: 30s
|
interval: 30s
|
||||||
|
@ -80,6 +81,7 @@ services:
|
||||||
- POSTGRES_INITDB_ARGS="-E \"UTF8\""
|
- POSTGRES_INITDB_ARGS="-E \"UTF8\""
|
||||||
- POSTGRES_PASSWORD_FILE=/run/secrets/db_password
|
- POSTGRES_PASSWORD_FILE=/run/secrets/db_password
|
||||||
- POSTGRES_USER=synapse
|
- POSTGRES_USER=synapse
|
||||||
|
- DOMAIN
|
||||||
networks:
|
networks:
|
||||||
- internal
|
- internal
|
||||||
healthcheck:
|
healthcheck:
|
||||||
|
|
Loading…
Reference in New Issue