@nebulon Figured out the problem!
In start.sh
we are calling migrate
and sync_templates
before we have setup the REDIS_HOST etc env variables from the CLOUDRON_ ones. These commands are the ones you are seeing failing to connect to redis and not the actual backend processes of Baserow. Previously in version 1.8 and prior these commands did not connect to redis. Now they do (they clear some cached data from redis which potentially becomes invalid on Baserow upgrade/database changes).
Below is a patch where i've entirely removed the supervisor.conf environment
section and just moved those variables setup into start.sh
prior to any command usage. This way we can be sure the management commands run with the same and correct environment as the actual supervisord run processes.
Index: supervisor.conf
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/supervisor.conf b/supervisor.conf
--- a/supervisor.conf (revision 825192ff012217ba76f726de16cd7a5cc5ade91f)
+++ b/supervisor.conf (date 1650878179553)
@@ -2,14 +2,6 @@
nodaemon = true
logfile=/dev/null
logfile_maxbytes=0
-environment =
- DJANGO_SETTINGS_MODULE='cloudron.settings',
- REDIS_HOST='%(ENV_CLOUDRON_REDIS_HOST)s',
- REDIS_PORT='%(ENV_CLOUDRON_REDIS_PORT)s',
- REDIS_PASSWORD='%(ENV_CLOUDRON_REDIS_PASSWORD)s',
- PRIVATE_BACKEND_URL='http://localhost:8000',
- PUBLIC_WEB_FRONTEND_URL='https://%(ENV_CLOUDRON_APP_DOMAIN)s',
- PUBLIC_BACKEND_URL='https://%(ENV_CLOUDRON_APP_DOMAIN)s'
[program:gunicorn]
user=cloudron
Index: start.sh
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/start.sh b/start.sh
--- a/start.sh (revision 825192ff012217ba76f726de16cd7a5cc5ade91f)
+++ b/start.sh (date 1650878843914)
@@ -7,11 +7,19 @@
fi
source /app/data/.secret
+export REDIS_HOST="$CLOUDRON_REDIS_HOST"
+export REDIS_PORT="$CLOUDRON_REDIS_PORT"
+export REDIS_PASSWORD="$CLOUDRON_REDIS_PASSWORD"
+export DJANGO_SETTINGS_MODULE="cloudron.settings"
+export PRIVATE_BACKEND_URL="http://localhost:8000"
+export PUBLIC_WEB_FRONTEND_URL="https://$CLOUDRON_APP_DOMAIN"
+export PUBLIC_BACKEND_URL="https://$CLOUDRON_APP_DOMAIN"
+
echo "==> Executing database migrations"
-/app/code/env/bin/python /app/code/backend/src/baserow/manage.py migrate --settings=cloudron.settings
+/app/code/env/bin/python /app/code/backend/src/baserow/manage.py migrate
echo "==> Syncing templates"
-/app/code/env/bin/python /app/code/backend/src/baserow/manage.py sync_templates --settings=cloudron.settings
+/app/code/env/bin/python /app/code/backend/src/baserow/manage.py sync_templates
chown -R cloudron:cloudron /app/data
With these changes I can now startup this image and it all works for me locally.