Added plus fixes for baserow
This commit is contained in:
parent
eeaf8e78f7
commit
30fd78824f
@ -3,10 +3,11 @@
|
||||
# Baserow Service
|
||||
|
||||
PATH=$HOME/.docker/cli-plugins:/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
|
||||
. /etc/federated
|
||||
get_appvars
|
||||
|
||||
config_baserow() {
|
||||
echo -ne "\n* Configuring /federated/apps/baserow container.."
|
||||
echo -ne "* Configuring baserow container.."
|
||||
|
||||
if [ ! -d "/federated/apps/baserow" ]; then
|
||||
mkdir -p /federated/apps/baserow/data/baserow/data
|
||||
@ -15,8 +16,6 @@ config_baserow() {
|
||||
BASEROW_SECRET=$(create_password);
|
||||
|
||||
cat > /federated/apps/baserow/docker-compose.yml <<EOF
|
||||
version: '3.7'
|
||||
|
||||
services:
|
||||
baserow:
|
||||
image: baserow/baserow:\${IMAGE_VERSION}
|
||||
@ -41,6 +40,8 @@ networks:
|
||||
external: true
|
||||
EOF
|
||||
|
||||
[[ "${PLUS}" = "true" ]] && sed -i "s/letsencrypt/httpresolver/g" /federated/apps/baserow/docker-compose.yml
|
||||
|
||||
cat > /federated/apps/baserow/.env <<EOF
|
||||
IMAGE_VERSION="1.18.0"
|
||||
BASEROW_PUBLIC_URL=https://baserow.$DOMAIN
|
||||
@ -81,12 +82,10 @@ docker exec postgresql psql -U postgres -c "CREATE USER baserow WITH PASSWORD '$
|
||||
docker exec postgresql psql -U postgres -c "CREATE DATABASE baserow" &> /dev/null
|
||||
docker exec postgresql psql -U postgres -c "GRANT ALL PRIVILEGES ON DATABASE baserow TO baserow" &> /dev/null
|
||||
|
||||
echo -ne "done."
|
||||
echo -ne "done.\n"
|
||||
}
|
||||
email_baserow() {
|
||||
echo -ne "* Sending email to customer.."
|
||||
spin &
|
||||
SPINPID=$!
|
||||
|
||||
cat > /federated/apps/mail/data/root/certs/mailfile <<EOF
|
||||
<html>
|
||||
@ -158,13 +157,10 @@ EOF
|
||||
docker exec mail bash -c "mail -r admin@$DOMAIN -a \"Content-type: text/html\" -s \"Application installed on $DOMAIN\" $EMAIL < /root/certs/mailfile"
|
||||
rm /federated/apps/mail/data/root/certs/mailfile
|
||||
|
||||
kill -9 $SPINPID &> /dev/null
|
||||
echo -ne "done.\n"
|
||||
}
|
||||
uninstall_baserow() {
|
||||
echo -ne "* Uninstalling baserow container.."
|
||||
spin &
|
||||
SPINPID=$!
|
||||
|
||||
# First stop the service
|
||||
cd /federated/apps/baserow && docker compose -f docker-compose.yml -p baserow down &> /dev/null
|
||||
@ -176,7 +172,8 @@ uninstall_baserow() {
|
||||
# Delete the app directory
|
||||
rm -rf /federated/apps/baserow
|
||||
|
||||
kill -9 $SPINPID &> /dev/null
|
||||
[[ "${PLUS}" != "true" ]] && docker exec pdns pdnsutil delete-rrset $DOMAIN baserow A &> /dev/null
|
||||
|
||||
echo -ne "done.\n"
|
||||
}
|
||||
start_baserow() {
|
||||
@ -198,5 +195,7 @@ start_baserow() {
|
||||
# Remove baserow create user
|
||||
rm /federated/apps/baserow/data/baserow/data/createuser.sh
|
||||
|
||||
[[ "${PLUS}" != "true" ]] && docker exec pdns pdnsutil add-record $DOMAIN baserow A 86400 $EXTERNALIP &> /dev/null
|
||||
|
||||
echo -ne "done."
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user