Added baserow and calcom services
This commit is contained in:
parent
8df3a543ea
commit
3d081ed5f6
@ -3,48 +3,21 @@
|
|||||||
# Federated installation script
|
# Federated installation script
|
||||||
|
|
||||||
PATH=$HOME/.docker/cli-plugins:/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
|
PATH=$HOME/.docker/cli-plugins:/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
|
||||||
|
. /federated/lib/functions.sh
|
||||||
trap cleanup `seq 0 15`
|
trap cleanup `seq 0 15`
|
||||||
|
|
||||||
cleanup() {
|
|
||||||
kill -9 $SPINPID &> /dev/null
|
|
||||||
exit 2
|
|
||||||
}
|
|
||||||
spin() {
|
|
||||||
spinner="/|\\-/|\\-"
|
|
||||||
while :
|
|
||||||
do
|
|
||||||
for i in `seq 0 7`
|
|
||||||
do
|
|
||||||
echo -n "${spinner:$i:1}"
|
|
||||||
echo -en "\010"
|
|
||||||
sleep 1
|
|
||||||
done
|
|
||||||
done
|
|
||||||
}
|
|
||||||
fail() {
|
|
||||||
echo -ne "FAILED\n\n$1\n\n"
|
|
||||||
kill -9 $SPINPID &> /dev/null
|
|
||||||
# [ -d "apps/dns" ] && rm -rf apps/dns
|
|
||||||
# docker network rm fstack &> /dev/null
|
|
||||||
exit 2;
|
|
||||||
}
|
|
||||||
failcheck() {
|
|
||||||
echo -ne "\n\nFAILED - $1\n\n"
|
|
||||||
exit 2;
|
|
||||||
}
|
|
||||||
get_config() {
|
get_config() {
|
||||||
FSTACKURL="http://137.184.95.3:8000"
|
# FSTACKURL="http://137.184.95.3:8000"
|
||||||
[ ! -d "/federated/lib" ] && mkdir -p /federated/lib
|
# [ ! -d "/federated/lib" ] && mkdir -p /federated/lib
|
||||||
|
|
||||||
# Download each library file
|
# Download each library file
|
||||||
for i in checks network dns ldap mail; do
|
# for i in checks network dns ldap mail; do
|
||||||
if [ ! -f "/federated/lib/$i.sh" ]; then
|
# if [ ! -f "/federated/lib/$i.sh" ]; then
|
||||||
curl $FSTACKURL/$i.sh -o /federated/lib/$i.sh -s -f &> /dev/null
|
# curl $FSTACKURL/$i.sh -o /federated/lib/$i.sh -s -f &> /dev/null
|
||||||
[ $? -ne 0 ] && failcheck "Couldn't download $i.sh"
|
# [ $? -ne 0 ] && failcheck "Couldn't download $i.sh"
|
||||||
fi
|
# fi
|
||||||
done
|
# done
|
||||||
|
|
||||||
. /federated/lib/functions.sh
|
|
||||||
. /federated/lib/checks.sh
|
. /federated/lib/checks.sh
|
||||||
. /federated/lib/network.sh
|
. /federated/lib/network.sh
|
||||||
. /federated/lib/dns.sh
|
. /federated/lib/dns.sh
|
||||||
@ -63,6 +36,7 @@ get_config() {
|
|||||||
. /federated/lib/wireguard.sh
|
. /federated/lib/wireguard.sh
|
||||||
. /federated/lib/connector.sh
|
. /federated/lib/connector.sh
|
||||||
. /federated/lib/baserow.sh
|
. /federated/lib/baserow.sh
|
||||||
|
. /federated/lib/calcom.sh
|
||||||
|
|
||||||
echo -ne "\nFederated Stack install script\n\n"
|
echo -ne "\nFederated Stack install script\n\n"
|
||||||
read -p '* Enter domain name (domain.com): ' DOMAIN
|
read -p '* Enter domain name (domain.com): ' DOMAIN
|
||||||
@ -93,7 +67,7 @@ check_ports
|
|||||||
config_network
|
config_network
|
||||||
|
|
||||||
# Configure and start each federated service
|
# Configure and start each federated service
|
||||||
for i in dns postgresql ldap mail collabora proxy nextcloud matrix element listmonk vaultwarden panel wireguard jitsi connector baserow; do
|
for i in dns postgresql ldap mail collabora proxy nextcloud matrix element listmonk vaultwarden panel wireguard jitsi connector baserow calcom; do
|
||||||
config_$i
|
config_$i
|
||||||
start_$i
|
start_$i
|
||||||
done
|
done
|
||||||
@ -113,6 +87,7 @@ vaultwarden.$DOMAIN
|
|||||||
vpn.$DOMAIN
|
vpn.$DOMAIN
|
||||||
connector.$DOMAIN
|
connector.$DOMAIN
|
||||||
baserow.$DOMAIN
|
baserow.$DOMAIN
|
||||||
|
calcom.$DOMAIN
|
||||||
|
|
||||||
* Your VPN Wireguard configuration is..
|
* Your VPN Wireguard configuration is..
|
||||||
EOF
|
EOF
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
# Federated Start Script
|
# Federated Start Script
|
||||||
|
|
||||||
usage() {
|
usage() {
|
||||||
echo "$0: all|dns|postgresql|ldap|mail|collabora|nextcloud|matrix|element|jitsi|listmonk|vaultwarden|panel|proxy|wireguard|connector|baserow"
|
echo "$0: all|dns|postgresql|ldap|mail|collabora|nextcloud|matrix|element|jitsi|listmonk|vaultwarden|panel|proxy|wireguard|connector|baserow|calcom"
|
||||||
exit 2
|
exit 2
|
||||||
}
|
}
|
||||||
startservice() {
|
startservice() {
|
||||||
@ -11,7 +11,7 @@ startservice() {
|
|||||||
cd /federated/apps/$SERVICE && docker-compose -f docker-compose.yml -p $SERVICE up -d
|
cd /federated/apps/$SERVICE && docker-compose -f docker-compose.yml -p $SERVICE up -d
|
||||||
}
|
}
|
||||||
startservice_all() {
|
startservice_all() {
|
||||||
for i in dns postgresql ldap mail collabora nextcloud matrix element jitsi listmonk vaultwarden panel proxy wireguard connector baserow; do
|
for i in dns postgresql ldap mail collabora nextcloud matrix element jitsi listmonk vaultwarden panel proxy wireguard connector baserow calcom; do
|
||||||
echo "* Starting $i.."
|
echo "* Starting $i.."
|
||||||
cd /federated/apps/$i && docker-compose -f docker-compose.yml -p $i up -d
|
cd /federated/apps/$i && docker-compose -f docker-compose.yml -p $i up -d
|
||||||
done
|
done
|
||||||
@ -22,6 +22,6 @@ SERVICE=$1
|
|||||||
|
|
||||||
case "$SERVICE" in
|
case "$SERVICE" in
|
||||||
all) startservice_all;;
|
all) startservice_all;;
|
||||||
dns|postgresql|ldap|mail|collabora|nextcloud|matrix|element|jitsi|listmonk|vaultwarden|panel|proxy|wireguard|connector|baserow) startservice;;
|
dns|postgresql|ldap|mail|collabora|nextcloud|matrix|element|jitsi|listmonk|vaultwarden|panel|proxy|wireguard|connector|baserow|calcom) startservice;;
|
||||||
*) usage;;
|
*) usage;;
|
||||||
esac
|
esac
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
# Federated Stop Script
|
# Federated Stop Script
|
||||||
|
|
||||||
usage() {
|
usage() {
|
||||||
echo "$0: all|dns|postgresql|ldap|mail|collabora|nextcloud|matrix|element|jitsi|listmonk|vaultwarden|panel|proxy|wireguard|connector|baserow"
|
echo "$0: all|dns|postgresql|ldap|mail|collabora|nextcloud|matrix|element|jitsi|listmonk|vaultwarden|panel|proxy|wireguard|connector|baserow|calcom"
|
||||||
exit 2
|
exit 2
|
||||||
}
|
}
|
||||||
stopservice() {
|
stopservice() {
|
||||||
@ -11,7 +11,7 @@ stopservice() {
|
|||||||
cd /federated/apps/$SERVICE && docker-compose -f docker-compose.yml -p $SERVICE down
|
cd /federated/apps/$SERVICE && docker-compose -f docker-compose.yml -p $SERVICE down
|
||||||
}
|
}
|
||||||
stopservice_all() {
|
stopservice_all() {
|
||||||
for i in dns postgresql ldap mail collabora nextcloud matrix element jitsi listmonk vaultwarden panel proxy wireguard connector baserow; do
|
for i in dns postgresql ldap mail collabora nextcloud matrix element jitsi listmonk vaultwarden panel proxy wireguard connector baserow calcom; do
|
||||||
echo "* Stopping $i.."
|
echo "* Stopping $i.."
|
||||||
cd /federated/apps/$i && docker-compose -f docker-compose.yml -p $i down
|
cd /federated/apps/$i && docker-compose -f docker-compose.yml -p $i down
|
||||||
done
|
done
|
||||||
@ -22,6 +22,6 @@ SERVICE=$1
|
|||||||
|
|
||||||
case "$SERVICE" in
|
case "$SERVICE" in
|
||||||
all) stopservice_all;;
|
all) stopservice_all;;
|
||||||
dns|postgresql|ldap|mail|collabora|nextcloud|matrix|element|jitsi|listmonk|vaultwarden|panel|proxy|wireguard|connector|baserow) stopservice;;
|
dns|postgresql|ldap|mail|collabora|nextcloud|matrix|element|jitsi|listmonk|vaultwarden|panel|proxy|wireguard|connector|baserow|calcom) stopservice;;
|
||||||
*) usage;;
|
*) usage;;
|
||||||
esac
|
esac
|
||||||
|
@ -64,10 +64,10 @@ cat > /federated/apps/baserow/data/createuser.sh <<EOF
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
curl -X POST -H 'Content-Type: application/json' -i http://localhost/api/user/ --data '{
|
curl -X POST -H 'Content-Type: application/json' -i http://localhost/api/user/ --data '{
|
||||||
"name": "admin",
|
"name": "admin11",
|
||||||
"email": "admin@$DOMAIN",
|
"email": "admin11@$DOMAIN",
|
||||||
"password": "$ADMINPASS"
|
"password": "$ADMINPASS"
|
||||||
}'
|
}' &> /dev/null
|
||||||
EOF
|
EOF
|
||||||
chmod +x /federated/apps/baserow/data/createuser.sh
|
chmod +x /federated/apps/baserow/data/createuser.sh
|
||||||
|
|
||||||
@ -76,36 +76,8 @@ echo -ne "done."
|
|||||||
}
|
}
|
||||||
|
|
||||||
start_baserow() {
|
start_baserow() {
|
||||||
# Start /federated/apps/baserow with output to /dev/null
|
# Start service with command to make sure it's up before proceeding
|
||||||
echo -ne "\n* Starting /federated/apps/baserow service.."
|
start_service "baserow" "docker exec -it baserow curl http://localhost:8000 &> /dev/null"
|
||||||
spin &
|
|
||||||
SPINPID=$!
|
|
||||||
|
|
||||||
if [ $DEBUG ]; then
|
|
||||||
# Start /federated/apps/baserow with output to console for debug
|
|
||||||
docker-compose -f /federated/apps/baserow/docker-compose.yml -p baserow up
|
|
||||||
[ $? -eq 0 ] && echo -ne "done.\n" || fail "There was a problem starting service /federated/apps/baserow"
|
|
||||||
else
|
|
||||||
docker-compose -f /federated/apps/baserow/docker-compose.yml -p baserow up -d &> /dev/null
|
|
||||||
|
|
||||||
# Keep trying baserow port 3000 to make sure it's up
|
|
||||||
# before we proceed
|
|
||||||
RETRY="30"
|
|
||||||
while [ $RETRY -gt 0 ]; do
|
|
||||||
docker exec -it baserow curl http://localhost:3000 &> /dev/null
|
|
||||||
if [ $? -eq 0 ]; then
|
|
||||||
break
|
|
||||||
else
|
|
||||||
if [ "$RETRY" == 1 ]; then
|
|
||||||
docker-compose -f /federated/apps/baserow/docker-compose.yml -p baserow down &> /dev/null
|
|
||||||
kill -9 $SPINPID &> /dev/null
|
|
||||||
fail "There was a problem starting service /federated/apps/baserow\nCheck the output of 'docker logs baserow' or turn on\ndebug with -d"
|
|
||||||
fi
|
|
||||||
((RETRY--))
|
|
||||||
sleep 7
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Move createuser.sh and set it executable
|
# Move createuser.sh and set it executable
|
||||||
mv /federated/apps/baserow/data/createuser.sh /federated/apps/baserow/data/baserow/data/
|
mv /federated/apps/baserow/data/createuser.sh /federated/apps/baserow/data/baserow/data/
|
||||||
|
84
lib/calcom.sh
Normal file
84
lib/calcom.sh
Normal file
@ -0,0 +1,84 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
#
|
||||||
|
# Cal.com Service
|
||||||
|
|
||||||
|
PATH=$HOME/.docker/cli-plugins:/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
|
||||||
|
|
||||||
|
config_calcom() {
|
||||||
|
echo -ne "\n* Configuring /federated/apps/calcom container.."
|
||||||
|
spin &
|
||||||
|
SPINPID=$!
|
||||||
|
|
||||||
|
if [ ! -d "/federated/apps/calcom" ]; then
|
||||||
|
mkdir -p /federated/apps/calcom
|
||||||
|
fi
|
||||||
|
|
||||||
|
DOMAIN_ARRAY=(${DOMAIN//./ })
|
||||||
|
DOMAIN_FIRST=${DOMAIN_ARRAY[0]}
|
||||||
|
DOMAIN_LAST=${DOMAIN_ARRAY[1]}
|
||||||
|
|
||||||
|
cat > /federated/apps/calcom/docker-compose.yml <<EOF
|
||||||
|
version: '3.7'
|
||||||
|
services:
|
||||||
|
calcom:
|
||||||
|
image: federatedcomputer/calcom:\${IMAGE_VERSION}
|
||||||
|
container_name: calcom
|
||||||
|
hostname: calcom.$DOMAIN
|
||||||
|
domainname: $DOMAIN
|
||||||
|
restart: always
|
||||||
|
networks:
|
||||||
|
federated:
|
||||||
|
ipv4_address: 172.99.0.29
|
||||||
|
# build:
|
||||||
|
# context: .
|
||||||
|
# dockerfile: Dockerfile
|
||||||
|
# args:
|
||||||
|
# NEXT_PUBLIC_WEBAPP_URL: \${NEXT_PUBLIC_WEBAPP_URL}
|
||||||
|
# NEXT_PUBLIC_LICENSE_CONSENT: \${NEXT_PUBLIC_LICENSE_CONSENT}
|
||||||
|
# CALCOM_TELEMETRY_DISABLED: \${CALCOM_TELEMETRY_DISABLED}
|
||||||
|
# NEXTAUTH_SECRET: \${NEXTAUTH_SECRET}
|
||||||
|
# CALENDSO_ENCRYPTION_KEY: \${CALENDSO_ENCRYPTION_KEY}
|
||||||
|
# DATABASE_URL: \${DATABASE_URL}
|
||||||
|
env_file: ./.env
|
||||||
|
|
||||||
|
networks:
|
||||||
|
federated:
|
||||||
|
external: true
|
||||||
|
EOF
|
||||||
|
|
||||||
|
cp /federated/lib/files/calcom/.env /federated/apps/calcom/
|
||||||
|
|
||||||
|
# Fix up .env file for our DOMAIN
|
||||||
|
sed -i "s#NEXT_PUBLIC_WEBAPP_URL=.*#NEXT_PUBLIC_WEBAPP_URL=http://calcom.$DOMAIN:3000#g" /federated/apps/calcom/.env
|
||||||
|
|
||||||
|
NEXTAUTH_SECRET=`openssl rand -base64 32`
|
||||||
|
sed -i "s#NEXTAUTH_SECRET=.*#NEXTAUTH_SECRET=$NEXTAUTH_SECRET#g" /federated/apps/calcom/.env
|
||||||
|
|
||||||
|
CALENDSO_ENCRYPTION_KEY=`dd if=/dev/urandom bs=1K count=1 2>/dev/null | md5sum | awk '{ print $1 }'`
|
||||||
|
sed -i "s#CALENDSO_ENCRYPTION_KEY=.*#CALENDSO_ENCRYPTION_KEY=$CALENDSO_ENCRYPTION_KEY#g" /federated/apps/calcom/.env
|
||||||
|
|
||||||
|
sed -i "s#POSTGRES_USER=.*#POSTGRES_USER=calcom#g" /federated/apps/calcom/.env
|
||||||
|
sed -i "s#POSTGRES_PASSWORD=.*#POSTGRES_PASSWORD=$CALCOM_SECRET#g" /federated/apps/calcom/.env
|
||||||
|
sed -i "s#POSTGRES_DB=.*#POSTGRES_DB=calcom#g" /federated/apps/calcom/.env
|
||||||
|
sed -i "s#DATABASE_HOST=.*#DATABASE_HOST=postgresql\.$DOMAIN:5432#g" /federated/apps/calcom/.env
|
||||||
|
sed -i "s#DATABASE_URL=.*#DATABASE_URL=postgresql://calcom:$CALCOM_SECRET@postgresql\.$DOMAIN/calcom#g" /federated/apps/calcom/.env
|
||||||
|
|
||||||
|
cat >> /federated/apps/calcom/.env <<EOF
|
||||||
|
IMAGE_VERSION="1.0"
|
||||||
|
VIRTUAL_PROTO=http
|
||||||
|
VIRTUAL_PORT=3000
|
||||||
|
VIRTUAL_HOST=calcom.$DOMAIN
|
||||||
|
EOF
|
||||||
|
chmod 600 /federated/apps/calcom/.env
|
||||||
|
|
||||||
|
kill -9 $SPINPID &> /dev/null
|
||||||
|
echo -ne "done."
|
||||||
|
}
|
||||||
|
|
||||||
|
start_calcom() {
|
||||||
|
# Start service with command to make sure it's up before proceeding
|
||||||
|
start_service "calcom" "nc -z 172.99.0.29 3000 &> /dev/null"
|
||||||
|
|
||||||
|
kill -9 $SPINPID &> /dev/null
|
||||||
|
echo -ne "done."
|
||||||
|
}
|
@ -58,8 +58,8 @@ check_ports() {
|
|||||||
|
|
||||||
# Check if ss command exists
|
# Check if ss command exists
|
||||||
if command -v ss &> /dev/null; then
|
if command -v ss &> /dev/null; then
|
||||||
# Check every port we need if it's in use
|
# Check every port we need if it's in use
|
||||||
for i in 25 53 80 143 389 587 993 8000; do
|
for i in 25 53 80 143 389 587 993 8000; do
|
||||||
SS=`ss -tulwn | grep LISTEN | awk '{ print $5 }' | awk -F: '{ print $NF }' | grep "^$i$" | head -1`
|
SS=`ss -tulwn | grep LISTEN | awk '{ print $5 }' | awk -F: '{ print $NF }' | grep "^$i$" | head -1`
|
||||||
# If port 53 (dns) in use by system-resolvd (Ubuntu) then auto fix
|
# If port 53 (dns) in use by system-resolvd (Ubuntu) then auto fix
|
||||||
if [ "$SS" == 53 ]; then
|
if [ "$SS" == 53 ]; then
|
||||||
|
@ -188,6 +188,8 @@ listmonk IN A $EXTERNALIP
|
|||||||
vaultwarden IN A $EXTERNALIP
|
vaultwarden IN A $EXTERNALIP
|
||||||
vpn IN A $EXTERNALIP
|
vpn IN A $EXTERNALIP
|
||||||
connector IN A $EXTERNALIP
|
connector IN A $EXTERNALIP
|
||||||
|
baserow IN A $EXTERNALIP
|
||||||
|
calcom IN A $EXTERNALIP
|
||||||
$DOMAIN. IN A $EXTERNALIP
|
$DOMAIN. IN A $EXTERNALIP
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
61
lib/files/calcom/.env
Normal file
61
lib/files/calcom/.env
Normal file
@ -0,0 +1,61 @@
|
|||||||
|
# Set this value to 'agree' to accept our license:
|
||||||
|
# LICENSE: https://github.com/calendso/calendso/blob/main/LICENSE
|
||||||
|
#
|
||||||
|
# Summary of terms:
|
||||||
|
# - The codebase has to stay open source, whether it was modified or not
|
||||||
|
# - You can not repackage or sell the codebase
|
||||||
|
# - Acquire a commercial license to remove these terms by emailing: license@cal.com
|
||||||
|
NEXT_PUBLIC_LICENSE_CONSENT=
|
||||||
|
LICENSE=
|
||||||
|
|
||||||
|
# BASE_URL and NEXT_PUBLIC_APP_URL are both deprecated. Both are replaced with one variable, NEXT_PUBLIC_WEBAPP_URL
|
||||||
|
# BASE_URL=http://localhost:3000
|
||||||
|
# NEXT_PUBLIC_APP_URL=http://localhost:3000
|
||||||
|
|
||||||
|
NEXT_PUBLIC_WEBAPP_URL=http://localhost
|
||||||
|
|
||||||
|
# Configure NEXTAUTH_URL manually if needed, otherwise it will resolve to {NEXT_PUBLIC_WEBAPP_URL}/api/auth
|
||||||
|
# NEXTAUTH_URL=http://localhost:3000/api/auth
|
||||||
|
|
||||||
|
# It is highly recommended that the NEXTAUTH_SECRET must be overridden and very unique
|
||||||
|
# Use `openssl rand -base64 32` to generate a key
|
||||||
|
NEXTAUTH_SECRET=secret
|
||||||
|
|
||||||
|
# Encryption key that will be used to encrypt CalDAV credentials, choose a random string, for example with `dd if=/dev/urandom bs=1K count=1 | md5sum`
|
||||||
|
CALENDSO_ENCRYPTION_KEY=secret
|
||||||
|
|
||||||
|
# Deprecation note: JWT_SECRET is no longer used
|
||||||
|
# JWT_SECRET=secret
|
||||||
|
|
||||||
|
POSTGRES_USER=cal
|
||||||
|
POSTGRES_PASSWORD=secret
|
||||||
|
POSTGRES_DB=cal
|
||||||
|
DATABASE_HOST=postgresql:5432
|
||||||
|
DATABASE_URL=postgresql
|
||||||
|
GOOGLE_API_CREDENTIALS={}
|
||||||
|
|
||||||
|
# Set this to '1' if you don't want Cal to collect anonymous usage
|
||||||
|
CALCOM_TELEMETRY_DISABLED=
|
||||||
|
|
||||||
|
# Used for the Office 365 / Outlook.com Calendar integration
|
||||||
|
MS_GRAPH_CLIENT_ID=
|
||||||
|
MS_GRAPH_CLIENT_SECRET=
|
||||||
|
|
||||||
|
# Used for the Zoom integration
|
||||||
|
ZOOM_CLIENT_ID=
|
||||||
|
ZOOM_CLIENT_SECRET=
|
||||||
|
|
||||||
|
# E-mail settings
|
||||||
|
# Configures the global From: header whilst sending emails.
|
||||||
|
EMAIL_FROM=notifications@example.com
|
||||||
|
|
||||||
|
# Configure SMTP settings (@see https://nodemailer.com/smtp/).
|
||||||
|
EMAIL_SERVER_HOST=smtp.example.com
|
||||||
|
EMAIL_SERVER_PORT=587
|
||||||
|
EMAIL_SERVER_USER=email_user
|
||||||
|
EMAIL_SERVER_PASSWORD=email_password
|
||||||
|
|
||||||
|
NODE_ENV=production
|
||||||
|
VIRTUAL_PROTO=http
|
||||||
|
VIRTUAL_PORT=3000
|
||||||
|
VIRTUAL_HOST=calcom.northendnetwork.com
|
Binary file not shown.
@ -1,3 +1,32 @@
|
|||||||
|
# Federated Computer functions
|
||||||
|
|
||||||
|
fail() {
|
||||||
|
echo -ne "FAILED\n\n$1\n\n"
|
||||||
|
kill -9 $SPINPID &> /dev/null
|
||||||
|
# [ -d "apps/dns" ] && rm -rf apps/dns
|
||||||
|
# docker network rm fstack &> /dev/null
|
||||||
|
exit 2;
|
||||||
|
}
|
||||||
|
failcheck() {
|
||||||
|
echo -ne "\n\nFAILED - $1\n\n"
|
||||||
|
exit 2;
|
||||||
|
}
|
||||||
|
cleanup() {
|
||||||
|
kill -9 $SPINPID &> /dev/null
|
||||||
|
exit 2
|
||||||
|
}
|
||||||
|
spin() {
|
||||||
|
spinner="/|\\-/|\\-"
|
||||||
|
while :
|
||||||
|
do
|
||||||
|
for i in `seq 0 7`
|
||||||
|
do
|
||||||
|
echo -n "${spinner:$i:1}"
|
||||||
|
echo -en "\010"
|
||||||
|
sleep 1
|
||||||
|
done
|
||||||
|
done
|
||||||
|
}
|
||||||
create_password() {
|
create_password() {
|
||||||
# eval $1_var=$1
|
# eval $1_var=$1
|
||||||
# echo "$postgres_var"
|
# echo "$postgres_var"
|
||||||
@ -5,12 +34,15 @@ create_password() {
|
|||||||
echo "$SECRET";
|
echo "$SECRET";
|
||||||
}
|
}
|
||||||
start_blah() {
|
start_blah() {
|
||||||
echo "val1 is $1";
|
SERVICE="$1"
|
||||||
echo "val2 is $2";
|
COMMAND="$2"
|
||||||
echo "val3 is $3";
|
$COMMAND &> /dev/null
|
||||||
echo "val4 is $4";
|
[ $? -eq 0 ] && echo -ne "done.\n" || fail "There was a problem starting service /federated/apps/$SERVICE"
|
||||||
}
|
}
|
||||||
start_service() {
|
start_service() {
|
||||||
|
SERVICE="$1"
|
||||||
|
COMMAND="$2"
|
||||||
|
|
||||||
# Start /federated/apps/SERVICE with output to /dev/null
|
# Start /federated/apps/SERVICE with output to /dev/null
|
||||||
echo -ne "\n* Starting /federated/apps/$SERVICE service.."
|
echo -ne "\n* Starting /federated/apps/$SERVICE service.."
|
||||||
spin &
|
spin &
|
||||||
@ -19,7 +51,7 @@ start_service() {
|
|||||||
if [ $DEBUG ]; then
|
if [ $DEBUG ]; then
|
||||||
# Start /federated/apps/SERVICE with output to console for debug
|
# Start /federated/apps/SERVICE with output to console for debug
|
||||||
docker-compose -f /federated/apps/$SERVICE/docker-compose.yml -p $SERVICE up
|
docker-compose -f /federated/apps/$SERVICE/docker-compose.yml -p $SERVICE up
|
||||||
[ $? -eq 0 ] && echo -ne "done.\n" || fail "There was a problem starting service /federated/apps/SERVICE"
|
[ $? -eq 0 ] && echo -ne "done.\n" || fail "There was a problem starting service /federated/apps/$SERVICE"
|
||||||
else
|
else
|
||||||
docker-compose -f /federated/apps/$SERVICE/docker-compose.yml -p $SERVICE up -d &> /dev/null
|
docker-compose -f /federated/apps/$SERVICE/docker-compose.yml -p $SERVICE up -d &> /dev/null
|
||||||
|
|
||||||
@ -27,7 +59,7 @@ start_service() {
|
|||||||
# we proceed
|
# we proceed
|
||||||
RETRY="30"
|
RETRY="30"
|
||||||
while [ $RETRY -gt 0 ]; do
|
while [ $RETRY -gt 0 ]; do
|
||||||
nc -z 172.99.0.19 9000 &> /dev/null
|
bash -c "$COMMAND" &> /dev/null
|
||||||
if [ $? -eq 0 ]; then
|
if [ $? -eq 0 ]; then
|
||||||
break
|
break
|
||||||
else
|
else
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
#
|
#
|
||||||
# Federated Computer Listmonk Service
|
# Listmonk Service
|
||||||
|
|
||||||
PATH=$HOME/.docker/cli-plugins:/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
|
PATH=$HOME/.docker/cli-plugins:/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
#
|
#
|
||||||
# Federated Computer Mail Service
|
# Mail Service
|
||||||
|
|
||||||
PATH=$HOME/.docker/cli-plugins:/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
|
PATH=$HOME/.docker/cli-plugins:/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
|
||||||
|
|
||||||
|
@ -160,6 +160,7 @@ PATH=/var/www/html:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/sbin:/bin
|
|||||||
./occ ldap:set-config s01 turnOnPasswordChange 0
|
./occ ldap:set-config s01 turnOnPasswordChange 0
|
||||||
./occ ldap:set-config s01 useMemberOfToDetectMembership 1
|
./occ ldap:set-config s01 useMemberOfToDetectMembership 1
|
||||||
./occ ldap:set-config s01 ldapConfigurationActive 1
|
./occ ldap:set-config s01 ldapConfigurationActive 1
|
||||||
|
./occ ldap:set-config s01 ldap_expert_username_attr uid
|
||||||
./occ config:system:set overwriteprotocol --value=https
|
./occ config:system:set overwriteprotocol --value=https
|
||||||
./occ config:system:delete trusted_domains
|
./occ config:system:delete trusted_domains
|
||||||
./occ config:system:set trusted_domains 1 --value=*
|
./occ config:system:set trusted_domains 1 --value=*
|
||||||
|
@ -77,6 +77,7 @@ VAULTWARDEN_SECRET=$(create_password);
|
|||||||
LISTMONK_SECRET=$(create_password);
|
LISTMONK_SECRET=$(create_password);
|
||||||
MATRIX_SECRET=$(create_password);
|
MATRIX_SECRET=$(create_password);
|
||||||
BASEROW_SECRET=$(create_password);
|
BASEROW_SECRET=$(create_password);
|
||||||
|
CALCOM_SECRET=$(create_password);
|
||||||
|
|
||||||
# cat postgresql/data/docker-entrypoint-initdb.d/init.sql
|
# cat postgresql/data/docker-entrypoint-initdb.d/init.sql
|
||||||
cat > /federated/apps/postgresql/data/docker-entrypoint-initdb.d/init.sql <<EOF
|
cat > /federated/apps/postgresql/data/docker-entrypoint-initdb.d/init.sql <<EOF
|
||||||
@ -92,6 +93,9 @@ GRANT ALL PRIVILEGES ON DATABASE matrix TO matrix;
|
|||||||
CREATE USER baserow WITH PASSWORD '$BASEROW_SECRET';
|
CREATE USER baserow WITH PASSWORD '$BASEROW_SECRET';
|
||||||
CREATE DATABASE baserow;
|
CREATE DATABASE baserow;
|
||||||
GRANT ALL PRIVILEGES ON DATABASE baserow TO baserow;
|
GRANT ALL PRIVILEGES ON DATABASE baserow TO baserow;
|
||||||
|
CREATE USER calcom WITH PASSWORD '$CALCOM_SECRET';
|
||||||
|
CREATE DATABASE calcom;
|
||||||
|
GRANT ALL PRIVILEGES ON DATABASE calcom TO calcom;
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
kill -9 $SPINPID &> /dev/null
|
kill -9 $SPINPID &> /dev/null
|
||||||
|
Loading…
x
Reference in New Issue
Block a user