Here’s a deeper explanation on the config files and if you need to edit another one:
- Baserow when it starts up looks for the environment variable
MEDIA_ROOT
and uses it to decide where it should store media files in the filesystem - By changing
/etc/supervisor/conf.d/baserow.conf
you change what this environment variable is when Baserow the server is started up bysupervisord
- However when you just run a
./baserow cmd
on the command line, it thebaserow
program also checks the environment for theMEDIA_ROOT
variable - The environment of your command line program is separate and wont use the config defined in
/etc/supervisor/conf.d/baserow.conf
which is just config for the particular program that launches and runs Baserow - So to properly run
./baserow cmd
's from the command line you need to separately set the environment variables in your command line first by either doing the above commandMEDIA_ROOT=/home/joeyli/opt/baserow/media baserow sync_templates
which setsMEDIA_ROOT
in the environment just for that particular command - Or you could run
export MEDIA_ROOT=/home/joeyli/opt/baserow/media
in your command line which will then keep it set for the remainder of your session. - There are a number of other things you could do here to not have to remember to keep on setting env variables when using the command line like creating a bash script which sets them up and then calls
baserow cmd
etc. You could also directly editbaserow/src/backend/baserow/config/settings/base.py:300
if you are comfortable making changes to the settings python file, however future upgrades of Baserow might require you to resolve merge conflicts.