mirror of
https://github.com/element-hq/element-docker-demo.git
synced 2026-01-25 14:31:09 +03:00
move things around
This commit is contained in:
24
scripts/create-multiple-postgresql-databases.sh
Executable file
24
scripts/create-multiple-postgresql-databases.sh
Executable file
@@ -0,0 +1,24 @@
|
||||
#!/bin/bash
|
||||
|
||||
# from https://github.com/mrts/docker-postgresql-multiple-databases
|
||||
|
||||
set -e
|
||||
set -u
|
||||
|
||||
function create_user_and_database() {
|
||||
local database=$1
|
||||
echo " Creating user and database '$database'"
|
||||
psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" <<-EOSQL
|
||||
CREATE USER $database;
|
||||
CREATE DATABASE $database;
|
||||
GRANT ALL PRIVILEGES ON DATABASE $database TO $database;
|
||||
EOSQL
|
||||
}
|
||||
|
||||
if [ -n "$POSTGRES_MULTIPLE_DATABASES" ]; then
|
||||
echo "Multiple database creation requested: $POSTGRES_MULTIPLE_DATABASES"
|
||||
for db in $(echo $POSTGRES_MULTIPLE_DATABASES | tr ',' ' '); do
|
||||
create_user_and_database $db
|
||||
done
|
||||
echo "Multiple databases created"
|
||||
fi
|
||||
10
scripts/livekit-jwt-entrypoint.sh
Executable file
10
scripts/livekit-jwt-entrypoint.sh
Executable file
@@ -0,0 +1,10 @@
|
||||
#!/bin/bash
|
||||
|
||||
# launch lk-jwt-service with secrets from disk
|
||||
|
||||
export LK_JWT_PORT=8080
|
||||
export LIVEKIT_URL=wss://${LIVEKIT_FQDN}
|
||||
export LIVEKIT_KEY=$(</run/secrets/livekit_api_key)
|
||||
export LIVEKIT_SECRET=$(</run/secrets/livekit_secret_key)
|
||||
|
||||
exec /lk-jwt-service
|
||||
Reference in New Issue
Block a user