Find below a list of FAQs and common operations when working with Baserow’s docker environment.
Docker version 20.10.0 is the minimum required to build Baserow. Please check that your docker is up to date by running
See baserow’s docker api for the full details on what commands and environment variables baserow’s docker-compose and docker image’s support.
$ docker-compose logs
Baserow’s docker-compose files will automatically bind to various ports on your machine’s network. If you already have applications or services using those ports the Baserow service which uses that port will crash:
Creating network "baserow_local" with driver "bridge" Creating db ... Creating db ... error Creating redis ... WARNING: Host is already in use by another container Creating mjml ... done Creating redis ... done ERROR: for db Cannot start service db: driver failed programming external connectivity on endpoint db (...): Error starting userland proxy: listen tcp4 0.0.0.0:5432: bind: address already in use ERROR: Encountered errors while bringing up the project.
To fix this you can change which ports Baserow will use by setting the corresponding environment variable:
POSTGRES_PORTwhich defaults to
REDIS_PORTwhich defaults to
MJML_PORTwhich defaults to
BACKEND_PORTwhich defaults to
WEB_FRONTEND_PORTwhich defaults to
MEDIA_PORTwhich defaults to
This is how to set these variables in bash:
$ POSTGRES_PORT=5555 REDIS_PORT=6666 MJML_PORT=7777 docker-compose up $ # or using dev.sh $ POSTGRES_PORT=5555 REDIS_PORT=6666 MJML_PORT=7777 ./dev.sh
See the introduction for the all the of email environment variables available to configure Baserow. For a simple example you can start up Baserow locally and have it connect to an external SMTP server like so:
EMAIL_SMTP_HOST=TODO EMAIL_SMTP_PORT=TODO EMAIL_SMTP=True docker-compose up
When running the dev env you can set the
GID environment variables when
building and running Baserow to change the user id and group id for the following
Remember you need to re-build if you change these variables or run
./dev.shfrom a new user. This is because Baserow’s images build with file permissions set to the given
GID, so if they change without a re-build they will be incorrect.
./dev.sh it will automatically set
GID to the ids of the user
running the command for you.
You can disable automatic migration by setting the
false (or any value which is not
true) like so:
$ MIGRATE_ON_STARTUP=false docker-compose -f docker-compose.yml -f docker-compose.dev.yml up -d $ # Or instead using ./dev.sh $ ./dev.sh dont_migrate # dev.sh supports this as an explicit argument. $ MIGRATE_ON_STARTUP=false ./dev.sh # or dev.sh will pass through whatever you have set.
# Run a one off dev container using the backend image which supports the "manage" command like so: $ docker-compose -f docker-compose.yml -f docker-compose.dev.yml run backend manage migrate $ # Or instead using ./dev.sh $ ./dev.sh run backend manage migrate
You can disable automatic baserow template syncing by setting the
SYNC_TEMPLATES_ON_STARTUP environment variable to
false (or any value which is
true) like so:
$ SYNC_TEMPLATES_ON_STARTUP=false docker-compose -f docker-compose.yml -f docker-compose.dev.yml up -d $ # Or instead using ./dev.sh $ ./dev.sh dont_sync # dev.sh supports this as an explicit argument. $ SYNC_TEMPLATES_ON_STARTUP=false ./dev.sh # or dev.sh it will pass through whatever you have set.
# Run a one off dev container using the backend image which supports the "manage" command like so: $ docker-compose -f docker-compose.yml -f docker-compose.dev.yml run backend manage sync_templates $ # Or instead using ./dev.sh $ ./dev.sh run backend manage sync_templates
This error occurs when attempting to build Baserow’s docker images with a version of
Docker earlier than 20.10.0. You can check your local docker version by
docker -v and fix the error by installing the latest version of Docker from
If you used Baserow’s dev env prior to April 2021 with the provided docker files you might encounter permission errors in the containers when upgrading. With the old docker files build output could end up being owned by root. These root owned files if they still exist in your repo will cause a problem starting the new dev env as Baserow’s containers now run as a non-root user.
To fix simply ensure all files in your baserow git repo are owned by your current user like so:
chown YOUR_USERNAME_HERE -R baserow/