mirror of
https://github.com/baserow/baserow.git
synced 2026-12-04 00:08:25 +00:00
Heroku fixes, updated docs, fix build.
This commit is contained in:
1 parent
2ee7ab56f7
commit
04f1d7f82f
51 files changed
+1508
-1088
No files matched your search
+2
-1
@@ -1,7 +1,8 @@
|
||||
SECRET_KEY=
|
||||
DATABASE_PASSWORD=
|
||||
REDIS_PASSWORD=
|
||||
BASEROW_PUBLIC_URLS=
|
||||
BASEROW_PUBLIC_URL=
|
||||
BASEROW_CADDY_ADDRESSES=
|
||||
WEB_FRONTEND_PORT=80
|
||||
HOST_PUBLISH_IP=0.0.0.0
|
||||
|
||||
|
||||
+40
-86
@@ -212,9 +212,6 @@ variables:
|
||||
CLEANUP_JOB_CI_TAG_PREFIX: ci-latest-
|
||||
# IMPORTANT: UPDATE GITLAB CONTAINER REPO CLEANUP JOB REGEX IF YOU CHANGE THIS
|
||||
TESTED_IMAGE_PREFIX: ci-tested-
|
||||
# An image repo where dev and normal images will be released to for public usage after
|
||||
# they have been successfully built and tested.
|
||||
RELEASE_IMAGE_REPO: $CI_REGISTRY_IMAGE/testing
|
||||
BACKEND_IMAGE_NAME: backend
|
||||
BACKEND_DEV_IMAGE_NAME: backend_dev
|
||||
WEBFRONTEND_IMAGE_NAME: web-frontend
|
||||
@@ -237,7 +234,7 @@ variables:
|
||||
DEVELOP_LATEST_TAG: develop-latest
|
||||
# Names of important branches used to decide when to run certain jobs.
|
||||
MASTER_BRANCH_NAME: master
|
||||
DEVELOP_BRANCH_NAME: 758-all-in-one-docker
|
||||
DEVELOP_BRANCH_NAME: develop
|
||||
# The locations of the various dockerfiles to build.
|
||||
BACKEND_DOCKERFILE_PATH: $CI_PROJECT_DIR/backend/Dockerfile
|
||||
WEBFRONTEND_DOCKERFILE_PATH: $CI_PROJECT_DIR/web-frontend/Dockerfile
|
||||
@@ -246,6 +243,10 @@ variables:
|
||||
HEROKU_DOCKERFILE_PATH: $CI_PROJECT_DIR/heroku.Dockerfile
|
||||
# The image path for the helper CI util image that will be built and pushed to.
|
||||
CI_UTIL_IMAGE: $CI_IMAGE_REPO/ci_util_image:latest
|
||||
RELEASE_REGISTRY: registry.hub.docker.com
|
||||
# An image repo where dev and normal images will be released to for public usage after
|
||||
# they have been successfully built and tested.
|
||||
RELEASE_IMAGE_REPO: baserow
|
||||
|
||||
# ==================================== CI UTIL ====================================
|
||||
|
||||
@@ -599,7 +600,7 @@ trigger-saas-build:
|
||||
allow_failure: true
|
||||
trigger:
|
||||
project: bramw/baserow-saas
|
||||
branch: 175-update-k8s-to-work-with-new-ci-images
|
||||
branch: develop
|
||||
|
||||
# ================================== PUSHING BACKEND ==================================
|
||||
|
||||
@@ -613,25 +614,9 @@ publish-backend-develop-latest-image:
|
||||
SKIP_IF_NOT_LATEST_COMMIT_ON_BRANCH: $DEVELOP_BRANCH_NAME
|
||||
SOURCE_IMAGE: $TESTED_BACKEND_CI_IMAGE
|
||||
TARGET_IMAGE: "$RELEASE_IMAGE_REPO/$BACKEND_IMAGE_NAME:$DEVELOP_LATEST_TAG"
|
||||
TARGET_REGISTRY: $CI_REGISTRY
|
||||
TARGET_REGISTRY_PASSWORD: $CI_REGISTRY_PASSWORD
|
||||
TARGET_REGISTRY_USER: $CI_REGISTRY_USER
|
||||
|
||||
|
||||
# Push baserow/backend_dev:develop_latest
|
||||
publish-backend-develop-latest-dev-image:
|
||||
extends: .publish-baserow-image
|
||||
only:
|
||||
variables:
|
||||
- $CI_COMMIT_BRANCH == $DEVELOP_BRANCH_NAME
|
||||
dependencies: []
|
||||
variables:
|
||||
SKIP_IF_NOT_LATEST_COMMIT_ON_BRANCH: $DEVELOP_BRANCH_NAME
|
||||
SOURCE_IMAGE: $TESTED_BACKEND_CI_DEV_IMAGE
|
||||
TARGET_IMAGE: "$RELEASE_IMAGE_REPO/$BACKEND_DEV_IMAGE_NAME:$DEVELOP_LATEST_TAG"
|
||||
TARGET_REGISTRY: $CI_REGISTRY
|
||||
TARGET_REGISTRY_PASSWORD: $CI_REGISTRY_PASSWORD
|
||||
TARGET_REGISTRY_USER: $CI_REGISTRY_USER
|
||||
TARGET_REGISTRY: $RELEASE_REGISTRY
|
||||
TARGET_REGISTRY_PASSWORD: $RELEASE_REGISTRY_PASSWORD
|
||||
TARGET_REGISTRY_USER: $RELEASE_REGISTRY_USER
|
||||
|
||||
# Push baserow/backend:$VERSION_GIT_TAG
|
||||
publish-backend-release-tagged-image:
|
||||
@@ -644,9 +629,9 @@ publish-backend-release-tagged-image:
|
||||
SKIP_IF_TAG_NOT_ON_BRANCH: $MASTER_BRANCH_NAME
|
||||
SOURCE_IMAGE: $TESTED_BACKEND_CI_IMAGE
|
||||
TARGET_IMAGE: "$RELEASE_IMAGE_REPO/$BACKEND_IMAGE_NAME:$CI_COMMIT_TAG"
|
||||
TARGET_REGISTRY: $CI_REGISTRY
|
||||
TARGET_REGISTRY_PASSWORD: $CI_REGISTRY_PASSWORD
|
||||
TARGET_REGISTRY_USER: $CI_REGISTRY_USER
|
||||
TARGET_REGISTRY: $RELEASE_REGISTRY
|
||||
TARGET_REGISTRY_PASSWORD: $RELEASE_REGISTRY_PASSWORD
|
||||
TARGET_REGISTRY_USER: $RELEASE_REGISTRY_USER
|
||||
|
||||
# Push baserow/backend:latest
|
||||
publish-backend-latest-release-image:
|
||||
@@ -660,9 +645,9 @@ publish-backend-latest-release-image:
|
||||
SKIP_IF_TAG_NOT_ON_BRANCH: $MASTER_BRANCH_NAME
|
||||
SOURCE_IMAGE: $TESTED_BACKEND_CI_IMAGE
|
||||
TARGET_IMAGE: "$RELEASE_IMAGE_REPO/$BACKEND_IMAGE_NAME:latest"
|
||||
TARGET_REGISTRY: $CI_REGISTRY
|
||||
TARGET_REGISTRY_PASSWORD: $CI_REGISTRY_PASSWORD
|
||||
TARGET_REGISTRY_USER: $CI_REGISTRY_USER
|
||||
TARGET_REGISTRY: $RELEASE_REGISTRY
|
||||
TARGET_REGISTRY_PASSWORD: $RELEASE_REGISTRY_PASSWORD
|
||||
TARGET_REGISTRY_USER: $RELEASE_REGISTRY_USER
|
||||
|
||||
# ================================ PUSHING WEB-FRONTEND ===============================
|
||||
|
||||
@@ -677,24 +662,9 @@ publish-webfrontend-develop-latest-image:
|
||||
SKIP_IF_NOT_LATEST_COMMIT_ON_BRANCH: $DEVELOP_BRANCH_NAME
|
||||
SOURCE_IMAGE: $TESTED_WEBFRONTEND_CI_IMAGE
|
||||
TARGET_IMAGE: "$RELEASE_IMAGE_REPO/$WEBFRONTEND_IMAGE_NAME:$DEVELOP_LATEST_TAG"
|
||||
TARGET_REGISTRY: $CI_REGISTRY
|
||||
TARGET_REGISTRY_PASSWORD: $CI_REGISTRY_PASSWORD
|
||||
TARGET_REGISTRY_USER: $CI_REGISTRY_USER
|
||||
|
||||
# Push baserow/web-frontend_dev:develop_latest
|
||||
publish-webfrontend-develop-latest-dev-image:
|
||||
extends: .publish-baserow-image
|
||||
only:
|
||||
variables:
|
||||
- $CI_COMMIT_BRANCH == $DEVELOP_BRANCH_NAME
|
||||
dependencies: []
|
||||
variables:
|
||||
SKIP_IF_NOT_LATEST_COMMIT_ON_BRANCH: $DEVELOP_BRANCH_NAME
|
||||
SOURCE_IMAGE: $TESTED_WEBFRONTEND_CI_DEV_IMAGE
|
||||
TARGET_IMAGE: "$RELEASE_IMAGE_REPO/$WEBFRONTEND_DEV_IMAGE_NAME:$DEVELOP_LATEST_TAG"
|
||||
TARGET_REGISTRY: $CI_REGISTRY
|
||||
TARGET_REGISTRY_PASSWORD: $CI_REGISTRY_PASSWORD
|
||||
TARGET_REGISTRY_USER: $CI_REGISTRY_USER
|
||||
TARGET_REGISTRY: $RELEASE_REGISTRY
|
||||
TARGET_REGISTRY_PASSWORD: $RELEASE_REGISTRY_PASSWORD
|
||||
TARGET_REGISTRY_USER: $RELEASE_REGISTRY_USER
|
||||
|
||||
# Push baserow/web-frontend:$VERSION_GIT_TAG
|
||||
publish-webfrontend-release-tagged-image:
|
||||
@@ -707,9 +677,9 @@ publish-webfrontend-release-tagged-image:
|
||||
SKIP_IF_TAG_NOT_ON_BRANCH: $MASTER_BRANCH_NAME
|
||||
SOURCE_IMAGE: $TESTED_WEBFRONTEND_CI_IMAGE
|
||||
TARGET_IMAGE: "$RELEASE_IMAGE_REPO/$WEBFRONTEND_IMAGE_NAME:$CI_COMMIT_TAG"
|
||||
TARGET_REGISTRY: $CI_REGISTRY
|
||||
TARGET_REGISTRY_PASSWORD: $CI_REGISTRY_PASSWORD
|
||||
TARGET_REGISTRY_USER: $CI_REGISTRY_USER
|
||||
TARGET_REGISTRY: $RELEASE_REGISTRY
|
||||
TARGET_REGISTRY_PASSWORD: $RELEASE_REGISTRY_PASSWORD
|
||||
TARGET_REGISTRY_USER: $RELEASE_REGISTRY_USER
|
||||
|
||||
# Push baserow/web-frontend:latest
|
||||
publish-webfrontend-latest-release-image:
|
||||
@@ -723,9 +693,9 @@ publish-webfrontend-latest-release-image:
|
||||
SKIP_IF_TAG_NOT_ON_BRANCH: $MASTER_BRANCH_NAME
|
||||
SOURCE_IMAGE: $TESTED_WEBFRONTEND_CI_IMAGE
|
||||
TARGET_IMAGE: "$RELEASE_IMAGE_REPO/$WEBFRONTEND_IMAGE_NAME:latest"
|
||||
TARGET_REGISTRY: $CI_REGISTRY
|
||||
TARGET_REGISTRY_PASSWORD: $CI_REGISTRY_PASSWORD
|
||||
TARGET_REGISTRY_USER: $CI_REGISTRY_USER
|
||||
TARGET_REGISTRY: $RELEASE_REGISTRY
|
||||
TARGET_REGISTRY_PASSWORD: $RELEASE_REGISTRY_PASSWORD
|
||||
TARGET_REGISTRY_USER: $RELEASE_REGISTRY_USER
|
||||
|
||||
# ================================ PUSHING ALL-IN-ONE ===============================
|
||||
|
||||
@@ -740,9 +710,9 @@ publish-allinone-develop-latest-image:
|
||||
SKIP_IF_NOT_LATEST_COMMIT_ON_BRANCH: $DEVELOP_BRANCH_NAME
|
||||
SOURCE_IMAGE: $TESTED_ALLINONE_CI_IMAGE
|
||||
TARGET_IMAGE: "$RELEASE_IMAGE_REPO/$ALLINONE_IMAGE_NAME:$DEVELOP_LATEST_TAG"
|
||||
TARGET_REGISTRY: $CI_REGISTRY
|
||||
TARGET_REGISTRY_PASSWORD: $CI_REGISTRY_PASSWORD
|
||||
TARGET_REGISTRY_USER: $CI_REGISTRY_USER
|
||||
TARGET_REGISTRY: $RELEASE_REGISTRY
|
||||
TARGET_REGISTRY_PASSWORD: $RELEASE_REGISTRY_PASSWORD
|
||||
TARGET_REGISTRY_USER: $RELEASE_REGISTRY_USER
|
||||
|
||||
# Push baserow/baserow:$VERSION_GIT_TAG
|
||||
publish-allinone-release-tagged-image:
|
||||
@@ -755,9 +725,9 @@ publish-allinone-release-tagged-image:
|
||||
SKIP_IF_TAG_NOT_ON_BRANCH: $MASTER_BRANCH_NAME
|
||||
SOURCE_IMAGE: $TESTED_ALLINONE_CI_IMAGE
|
||||
TARGET_IMAGE: "$RELEASE_IMAGE_REPO/$ALLINONE_IMAGE_NAME:$CI_COMMIT_TAG"
|
||||
TARGET_REGISTRY: $CI_REGISTRY
|
||||
TARGET_REGISTRY_PASSWORD: $CI_REGISTRY_PASSWORD
|
||||
TARGET_REGISTRY_USER: $CI_REGISTRY_USER
|
||||
TARGET_REGISTRY: $RELEASE_REGISTRY
|
||||
TARGET_REGISTRY_PASSWORD: $RELEASE_REGISTRY_PASSWORD
|
||||
TARGET_REGISTRY_USER: $RELEASE_REGISTRY_USER
|
||||
|
||||
# Push baserow/baserow:latest
|
||||
publish-allinone-latest-release-image:
|
||||
@@ -771,10 +741,10 @@ publish-allinone-latest-release-image:
|
||||
SKIP_IF_TAG_NOT_ON_BRANCH: $MASTER_BRANCH_NAME
|
||||
SOURCE_IMAGE: $TESTED_ALLINONE_CI_IMAGE
|
||||
TARGET_IMAGE: "$RELEASE_IMAGE_REPO/$ALLINONE_IMAGE_NAME:latest"
|
||||
TARGET_REGISTRY: $CI_REGISTRY
|
||||
TARGET_REGISTRY_PASSWORD: $CI_REGISTRY_PASSWORD
|
||||
TARGET_REGISTRY_USER: $CI_REGISTRY_USER
|
||||
|
||||
TARGET_REGISTRY: $RELEASE_REGISTRY
|
||||
TARGET_REGISTRY_PASSWORD: $RELEASE_REGISTRY_PASSWORD
|
||||
TARGET_REGISTRY_USER: $RELEASE_REGISTRY_USER
|
||||
|
||||
# Push baserow/cloudron:develop_latest
|
||||
publish-cloudron-develop-latest-image:
|
||||
extends: .publish-baserow-image
|
||||
@@ -786,9 +756,9 @@ publish-cloudron-develop-latest-image:
|
||||
SKIP_IF_NOT_LATEST_COMMIT_ON_BRANCH: $DEVELOP_BRANCH_NAME
|
||||
SOURCE_IMAGE: $TESTED_CLOUDRON_CI_IMAGE
|
||||
TARGET_IMAGE: "$RELEASE_IMAGE_REPO/$CLOUDRON_IMAGE_NAME:$DEVELOP_LATEST_TAG"
|
||||
TARGET_REGISTRY: $CI_REGISTRY
|
||||
TARGET_REGISTRY_PASSWORD: $CI_REGISTRY_PASSWORD
|
||||
TARGET_REGISTRY_USER: $CI_REGISTRY_USER
|
||||
TARGET_REGISTRY: $RELEASE_REGISTRY
|
||||
TARGET_REGISTRY_PASSWORD: $RELEASE_REGISTRY_PASSWORD
|
||||
TARGET_REGISTRY_USER: $RELEASE_REGISTRY_USER
|
||||
|
||||
# Push baserow/cloudron:$VERSION_GIT_TAG
|
||||
publish-cloudron-release-tagged-image:
|
||||
@@ -801,25 +771,9 @@ publish-cloudron-release-tagged-image:
|
||||
SKIP_IF_TAG_NOT_ON_BRANCH: $MASTER_BRANCH_NAME
|
||||
SOURCE_IMAGE: $TESTED_CLOUDRON_CI_IMAGE
|
||||
TARGET_IMAGE: "$RELEASE_IMAGE_REPO/$CLOUDRON_IMAGE_NAME:$CI_COMMIT_TAG"
|
||||
TARGET_REGISTRY: $CI_REGISTRY
|
||||
TARGET_REGISTRY_PASSWORD: $CI_REGISTRY_PASSWORD
|
||||
TARGET_REGISTRY_USER: $CI_REGISTRY_USER
|
||||
|
||||
# Push baserow/cloudron:latest
|
||||
publish-cloudron-latest-release-image:
|
||||
extends: .publish-baserow-image
|
||||
only:
|
||||
refs:
|
||||
- tags
|
||||
dependencies: []
|
||||
variables:
|
||||
SKIP_IF_NOT_LATEST_COMMIT_ON_BRANCH: $MASTER_BRANCH_NAME
|
||||
SKIP_IF_TAG_NOT_ON_BRANCH: $MASTER_BRANCH_NAME
|
||||
SOURCE_IMAGE: $TESTED_CLOUDRON_CI_IMAGE
|
||||
TARGET_IMAGE: "$RELEASE_IMAGE_REPO/$CLOUDRON_IMAGE_NAME:latest"
|
||||
TARGET_REGISTRY: $CI_REGISTRY
|
||||
TARGET_REGISTRY_PASSWORD: $CI_REGISTRY_PASSWORD
|
||||
TARGET_REGISTRY_USER: $CI_REGISTRY_USER
|
||||
TARGET_REGISTRY: $RELEASE_REGISTRY
|
||||
TARGET_REGISTRY_PASSWORD: $RELEASE_REGISTRY_PASSWORD
|
||||
TARGET_REGISTRY_USER: $RELEASE_REGISTRY_USER
|
||||
|
||||
# We don't push any heroku images as Heroku itself will build and use heroku.Dockerfile
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
{$BASEROW_CADDY_GLOBAL_CONF}
|
||||
}
|
||||
|
||||
{$BASEROW_PUBLIC_URLS} {
|
||||
{$BASEROW_CADDY_ADDRESSES} {
|
||||
handle /api/* {
|
||||
reverse_proxy {$PRIVATE_BACKEND_URL:localhost:8000}
|
||||
}
|
||||
@@ -25,6 +25,4 @@
|
||||
}
|
||||
|
||||
reverse_proxy {$PRIVATE_WEBFRONTEND_URL:localhost:3000}
|
||||
|
||||
{$BASEROW_CADDY_EXTRA_CONF}
|
||||
}
|
||||
@@ -6,22 +6,25 @@ tool gives you the powers of a developer without leaving your browser.
|
||||
* A spreadsheet database hybrid combining ease of use and powerful data organization.
|
||||
* Easily self-hosted with no storage restrictions or sign-up on https://baserow.io to
|
||||
get started immediately.
|
||||
* Alternative to Airtable.
|
||||
* Open-core with all non-premium features under
|
||||
the [MIT License](https://choosealicense.com/licenses/mit/) allowing commercial and
|
||||
private use.
|
||||
* Headless and API first.
|
||||
* Uses popular frameworks and tools like [Django](https://www.djangoproject.com/),
|
||||
[Vue.js](https://vuejs.org/) and [PostgreSQL](https://www.postgresql.org/).
|
||||
|
||||
[](https://heroku.com/deploy?template=https://github.com/bram2w/baserow/tree/master)
|
||||
|
||||
```bash
|
||||
docker run -v baserow_data:/baserow/data -p 80:80 -p 443:443 baserow/baserow:1.8.2
|
||||
docker run -v baserow_data:/baserow/data -p 80:80 -p 443:443 baserow/baserow:1.8.3
|
||||
```
|
||||
|
||||

|
||||
|
||||
## Get Involved
|
||||
|
||||
**We're hiring** remote developers! More information at
|
||||
https://baserow.io/jobs/experienced-full-stack-developer.
|
||||
**We're hiring remotely**! More information at https://baserow.io/jobs.
|
||||
|
||||
Join our forum on https://community.baserow.io/ or on Gitter via
|
||||
https://gitter.im/bramw-baserow/community. See [CONTRIBUTING.md](./CONTRIBUTING.md) on
|
||||
@@ -29,14 +32,11 @@ how to become a contributor.
|
||||
|
||||
## Installation
|
||||
|
||||
* [**Docker**](docs/installation/install-using-docker.md)
|
||||
* [](https://heroku.com/deploy?template=https://github.com/bram2w/baserow/tree/master)
|
||||
* [**Docker**](docs/installation/install-with-docker.md)
|
||||
* [**Ubuntu**](docs/installation/install-on-ubuntu.md)
|
||||
* [**Docker Compose** ](docs/installation/install-using-docker-compose.md)
|
||||
* [**
|
||||
Heroku**: Easily install and scale up Baserow on Heroku.](docs/installation/install-on-heroku.md)
|
||||
* [**
|
||||
Cloudron**: Install and update Baserow on your own Cloudron server.](docs/installation/install-on-cloudron.md)
|
||||
* [**Docker Compose** ](docs/installation/install-with-docker-compose.md)
|
||||
* [**Heroku**: Easily install and scale up Baserow on Heroku.](docs/installation/install-on-heroku.md)
|
||||
* [**Cloudron**: Install and update Baserow on your own Cloudron server.](docs/installation/install-on-cloudron.md)
|
||||
|
||||
## Official documentation
|
||||
|
||||
@@ -86,7 +86,7 @@ Created by Baserow B.V. - bram@baserow.io.
|
||||
|
||||
Distributes under the MIT license. See `LICENSE` for more information.
|
||||
|
||||
Version: 1.8.2
|
||||
Version: 1.8.3
|
||||
|
||||
The official repository can be found at https://gitlab.com/bramw/baserow.
|
||||
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
Please send a detailed email to bramw@baserow.io to report vulnerabilities in Baserow.
|
||||
Please send a detailed email to bram@baserow.io to report vulnerabilities in Baserow.
|
||||
@@ -34,7 +34,7 @@
|
||||
},
|
||||
"SYNC_TEMPLATES_ON_STARTUP": {
|
||||
"description": "Automatically install's baserow's built in templates when set to 'true'. Disabled by default because the free Heroku database only supports 10k rows, Baserows templates if installed will use 12k rows and go over the limit. Change this to 'true' without the quotes if you have paid for the Heroku database upgrade and can store more than 10k rows. ",
|
||||
"value": "no",
|
||||
"value": "false",
|
||||
"required": false
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@ BASEROW_AMOUNT_OF_WORKERS=${BASEROW_AMOUNT_OF_WORKERS:-1}
|
||||
BASEROW_AMOUNT_OF_GUNICORN_WORKERS=${BASEROW_AMOUNT_OF_GUNICORN_WORKERS:-3}
|
||||
|
||||
# Celery related variables
|
||||
BASEROW_RUN_MINIMAL_CELERY=${BASEROW_RUN_MINIMAL_CELERY:-}
|
||||
BASEROW_RUN_MINIMAL=${BASEROW_RUN_MINIMAL:-}
|
||||
BASEROW_CELERY_BEAT_STARTUP_DELAY=${BASEROW_CELERY_BEAT_STARTUP_DELAY:-15}
|
||||
|
||||
|
||||
@@ -153,7 +153,7 @@ fi
|
||||
}
|
||||
|
||||
start_celery_worker(){
|
||||
if [[ -n "$BASEROW_RUN_MINIMAL_CELERY" ]]; then
|
||||
if [[ -n "$BASEROW_RUN_MINIMAL" ]]; then
|
||||
EXTRA_CELERY_ARGS=(--without-heartbeat --without-gossip --without-mingle)
|
||||
else
|
||||
EXTRA_CELERY_ARGS=()
|
||||
@@ -251,14 +251,25 @@ case "$1" in
|
||||
exec make ci-check-startup-python
|
||||
;;
|
||||
celery-worker)
|
||||
start_celery_worker -Q celery -n default-worker@%h "${@:2}"
|
||||
if [[ -n "${BASEROW_RUN_MINIMAL}" && $BASEROW_AMOUNT_OF_WORKERS == "1" ]]; then
|
||||
echo "Starting combined celery and export worker..."
|
||||
start_celery_worker -Q celery,export -n default-worker@%h "${@:2}"
|
||||
else
|
||||
start_celery_worker -Q celery -n default-worker@%h "${@:2}"
|
||||
fi
|
||||
;;
|
||||
celery-worker-healthcheck)
|
||||
echo "Running celery worker healthcheck..."
|
||||
exec celery -A baserow inspect ping -d "default-worker@$HOSTNAME" -t 10 "${@:2}"
|
||||
;;
|
||||
celery-exportworker)
|
||||
start_celery_worker -Q export -n export-worker@%h "${@:2}"
|
||||
if [[ -n "${BASEROW_RUN_MINIMAL}" && $BASEROW_AMOUNT_OF_WORKERS == "1" ]]; then
|
||||
echo "Not starting export worker as the other worker will handle both queues " \
|
||||
"to reduce memory usage"
|
||||
while true; do sleep 2073600; done
|
||||
else
|
||||
start_celery_worker -Q export -n export-worker@%h "${@:2}"
|
||||
fi
|
||||
;;
|
||||
celery-exportworker-healthcheck)
|
||||
echo "Running celery export worker healthcheck..."
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@ from setuptools import find_packages, setup
|
||||
|
||||
PROJECT_DIR = os.path.dirname(__file__)
|
||||
REQUIREMENTS_DIR = os.path.join(PROJECT_DIR, "requirements")
|
||||
VERSION = "1.8.2"
|
||||
VERSION = "1.8.3"
|
||||
|
||||
|
||||
def get_requirements(env):
|
||||
|
||||
@@ -4,7 +4,6 @@ from urllib.parse import urlparse, urljoin
|
||||
import dj_database_url
|
||||
|
||||
from corsheaders.defaults import default_headers
|
||||
from django.core.exceptions import ImproperlyConfigured
|
||||
|
||||
from baserow.version import VERSION
|
||||
|
||||
@@ -255,7 +254,7 @@ SPECTACULAR_SETTINGS = {
|
||||
"name": "MIT",
|
||||
"url": "https://gitlab.com/bramw/baserow/-/blob/master/LICENSE",
|
||||
},
|
||||
"VERSION": "1.8.2",
|
||||
"VERSION": "1.8.3",
|
||||
"SERVE_INCLUDE_SCHEMA": False,
|
||||
"TAGS": [
|
||||
{"name": "Settings"},
|
||||
@@ -325,26 +324,16 @@ if os.getenv("AWS_S3_CUSTOM_DOMAIN", "") != "":
|
||||
AWS_S3_CUSTOM_DOMAIN = os.getenv("AWS_S3_CUSTOM_DOMAIN")
|
||||
|
||||
EXTRA_ALLOWED_HOSTS_TO_ATTEMPT_ADDING = []
|
||||
if "BASEROW_PUBLIC_URLS" in os.environ:
|
||||
BASEROW_PUBLIC_URLS = [
|
||||
url.strip() for url in os.getenv("BASEROW_PUBLIC_URLS").split(",")
|
||||
]
|
||||
if len(BASEROW_PUBLIC_URLS) == 0:
|
||||
raise ImproperlyConfigured(
|
||||
"BASEROW_PUBLIC_URLS was provided but was empty, it must be a comma "
|
||||
"separated list of urls, ports or hosts."
|
||||
)
|
||||
|
||||
FIRST_PUBLIC_URL = BASEROW_PUBLIC_URLS[0]
|
||||
PUBLIC_BACKEND_URL = FIRST_PUBLIC_URL
|
||||
PUBLIC_WEB_FRONTEND_URL = FIRST_PUBLIC_URL
|
||||
EXTRA_ALLOWED_HOSTS_TO_ATTEMPT_ADDING = BASEROW_PUBLIC_URLS[1:]
|
||||
if FIRST_PUBLIC_URL == "http://localhost":
|
||||
if "BASEROW_PUBLIC_URL" in os.environ:
|
||||
BASEROW_PUBLIC_URL = os.getenv("BASEROW_PUBLIC_URL")
|
||||
PUBLIC_BACKEND_URL = BASEROW_PUBLIC_URL
|
||||
PUBLIC_WEB_FRONTEND_URL = BASEROW_PUBLIC_URL
|
||||
if BASEROW_PUBLIC_URL == "http://localhost":
|
||||
print(
|
||||
"WARNING: Starting up Baserow with a default first BASEROW_PUBLIC_URL of "
|
||||
"http://localhost. If you attempt to access Baserow on any other hostname"
|
||||
"requests to the backend will fail as they will be from an unknown host."
|
||||
"Please set BASEROW_PUBLIC_URLS if you will be accessing Baserow "
|
||||
"WARNING: Starting up Baserow with a default BASEROW_PUBLIC_URL of "
|
||||
"http://localhost. If you attempt to access Baserow on any other hostname "
|
||||
"requests to the backend will fail as they will be from an unknown host. "
|
||||
"Please set BASEROW_PUBLIC_URL if you will be accessing Baserow "
|
||||
"from any other URL then http://locahost."
|
||||
)
|
||||
else:
|
||||
|
||||
@@ -2,15 +2,21 @@ from .base import * # noqa: F403, F401
|
||||
import os
|
||||
import ssl
|
||||
|
||||
# We need to set the certificate check to None, otherwise it is not compatible with the
|
||||
# `heroku-redis:hobby-dev` addon. The URL generated by that addon is over a secured
|
||||
# connection with a self signed certificate. The redis broker could fail if the
|
||||
# certificate can't be verified.
|
||||
CELERY_REDBEAT_REDIS_USE_SSL = {"ssl_cert_reqs": ssl.CERT_NONE}
|
||||
ssl_context = ssl.SSLContext()
|
||||
ssl_context.verify_mode = ssl.CERT_NONE
|
||||
CHANNELS_REDIS_HOST = {"address": REDIS_URL, "ssl": ssl_context} # noqa: F405
|
||||
CHANNEL_LAYERS["default"]["CONFIG"]["hosts"] = [CHANNELS_REDIS_HOST] # noqa: F405
|
||||
if REDIS_PROTOCOL == "rediss" or "rediss" in REDIS_URL: # noqa: F405
|
||||
# We need to set the certificate check to None, otherwise it is not compatible with
|
||||
# the `heroku-redis:hobby-dev` addon. The URL generated by that addon is over a
|
||||
# secured connection with a self signed certificate. The redis broker could fail
|
||||
# if the certificate can't be verified.
|
||||
CELERY_REDBEAT_REDIS_USE_SSL = {"ssl_cert_reqs": ssl.CERT_NONE}
|
||||
ssl_context = ssl.SSLContext()
|
||||
ssl_context.verify_mode = ssl.CERT_NONE
|
||||
CHANNELS_REDIS_HOST = {"address": REDIS_URL, "ssl": ssl_context} # noqa: F405
|
||||
CHANNEL_LAYERS["default"]["CONFIG"]["hosts"] = [CHANNELS_REDIS_HOST] # noqa: F405
|
||||
|
||||
# The built in healthcheck does not handle customizing ssl_cert_reqs...
|
||||
INSTALLED_APPS.remove("health_check.contrib.redis") # noqa: F405
|
||||
for CACHE in CACHES.values(): # noqa: F405
|
||||
CACHE["OPTIONS"]["CONNECTION_POOL_KWARGS"] = {"ssl_cert_reqs": None}
|
||||
|
||||
# Set the limit of the connection pool based on the amount of workers that must be
|
||||
# started with a limit of 10, which is the default value. This is needed because the
|
||||
|
||||
@@ -1 +1 @@
|
||||
VERSION = "1.8.2"
|
||||
VERSION = "1.8.3"
|
||||
+2
-2
@@ -34,8 +34,8 @@
|
||||
* Add the all-in-one Baserow docker image.
|
||||
* Migrate the Baserow Cloudron and Heroku images to work from the all-in-one.
|
||||
* **breaking change** docker-compose.yml now requires secrets to be setup by the user,
|
||||
listens by default on 0.0.0.0:80 with a Caddy reverse proxy, use BASEROW_PUBLIC_URLS
|
||||
now to configure a domain.
|
||||
listens by default on 0.0.0.0:80 with a Caddy reverse proxy, use BASEROW_PUBLIC_URL
|
||||
and BASEROW_CADDY_ADDRESSES now to configure a domain with optional auto https.
|
||||
* Add health checks for all services.
|
||||
* Ensure error logging is enabled in the Backend even when DEBUG is off.
|
||||
|
||||
|
||||
@@ -0,0 +1,388 @@
|
||||
## Baserow is an open source no-code database tool and Airtable alternative.
|
||||
|
||||
Create your own online database without technical experience. Our user-friendly no-code
|
||||
tool gives you the powers of a developer without leaving your browser.
|
||||
|
||||
* A spreadsheet database hybrid combining ease of use and powerful data organization.
|
||||
* Easily self-hosted with no storage restrictions or sign-up on https://baserow.io to
|
||||
get started immediately.
|
||||
* Alternative to Airtable.
|
||||
* Open-core with all non-premium features under
|
||||
the [MIT License](https://choosealicense.com/licenses/mit/) allowing commercial and
|
||||
private use.
|
||||
* Headless and API first.
|
||||
* Uses popular frameworks and tools like [Django](https://www.djangoproject.com/),
|
||||
[Vue.js](https://vuejs.org/) and [PostgreSQL](https://www.postgresql.org/).
|
||||
|
||||
```bash
|
||||
docker run -v baserow_data:/baserow/data -p 80:80 -p 443:443 baserow/baserow:1.8.3
|
||||
```
|
||||
|
||||
## Quick Reference
|
||||
|
||||
* **Maintained By**: [baserow.io](https://baserow.io/contact)
|
||||
* **Get Support At**: [The Baserow Community Forums](https://community.baserow.io)
|
||||
* **Source Code Available At**: [gitlab.com/bramw/baserow](https://gitlab.com/bramw/baserow)
|
||||
* **Docs At**: [baserow.io/docs](https://baserow.io/docs)
|
||||
* **License**: Open-Core with all non-premium code under the MIT license.
|
||||
|
||||
## Supported tags and Dockerfile Links
|
||||
|
||||
* [`1.8.3`](https://gitlab.com/bramw/baserow/-/blob/1.8.3/deploy/all-in-one/Dockerfile)
|
||||
* [`develop_latest`](https://gitlab.com/bramw/baserow/-/blob/develop/deploy/all-in-one/Dockerfile)
|
||||
|
||||
## Quick Start
|
||||
|
||||
Run the command below to start a Baserow server running locally listening on port `80`.
|
||||
You will only be able to connect to Baserow from the machine running the server via
|
||||
`http://localhost`.
|
||||
|
||||
```bash
|
||||
docker run \
|
||||
-d \
|
||||
--name baserow \
|
||||
-e BASEROW_PUBLIC_URL=http://localhost \
|
||||
-v baserow_data:/baserow/data \
|
||||
-p 80:80 \
|
||||
-p 443:443 \
|
||||
--restart unless-stopped \
|
||||
baserow/baserow:1.8.3
|
||||
```
|
||||
|
||||
* Change `BASEROW_PUBLIC_URL` to `https://YOUR_DOMAIN` or `http://YOUR_IP` to enable
|
||||
external access.
|
||||
* Add `-e BASEROW_CADDY_ADDRESSES=https://YOUR_DOMAIN` to enable
|
||||
[automatic Caddy HTTPS](https://caddyserver.com/docs/caddyfile/concepts#addresses).
|
||||
* Optionally add `-e DATABASE_URL=postgresql://user:pwd@host:port/db` to use an external
|
||||
Postgresql.
|
||||
* Optionally add `-e REDIS_URL=redis://user:pwd@host:port` to use an external Redis.
|
||||
|
||||
> There is a security flaw with docker and the ufw firewall.
|
||||
> By default docker when exposing ports on 0.0.0.0 will bypass any ufw firewall rules
|
||||
> and expose the above container publicly from your machine on its network. If this
|
||||
> is not intended then run with the following ports instead:
|
||||
> `-p 127.0.0.1:80:80 -p 127.0.0.1:443:443` which makes your Baserow only accessible
|
||||
> from the machine it is running on.
|
||||
> Please see https://github.com/chaifeng/ufw-docker for more information and how to
|
||||
> setup ufw to work securely with docker.
|
||||
|
||||
## Image Feature Overview
|
||||
|
||||
The `baserow/baserow:1.8.3` image by default runs all of Baserow's various services in a
|
||||
single container for ease of use. A quick summary of its features are:
|
||||
|
||||
* Runs a Postgres database and Redis server by default internally and stores all data in
|
||||
the `/baserow/data` folder inside the container.
|
||||
* Set `DATABASE_URL` or the `DATABASE_...` variables to disable the internal postgres
|
||||
and instead connect to an external Postgres.
|
||||
* Set `REDIS_URL` or the `REDIS_...` variables to disable the internal redis and instead
|
||||
connect to an external Postgres.
|
||||
* Runs all services behind a pre-configured Caddy reverse proxy. Set
|
||||
`BASEROW_CADDY_ADDRESSES` to `https://YOUR_DOMAIN.com` and it will
|
||||
[automaticly enable https](https://caddyserver.com/docs/automatic-https#overview) for
|
||||
you and store the keys and certs in `/baserow/data/caddy`.
|
||||
* Provides a CLI for execing admin commands against a running Baserow container or
|
||||
running one off commands against just a Baserow data volume.
|
||||
|
||||
## Example Commands
|
||||
|
||||
See [Configuring Baserow](configuration.md) for more detailed information on all the
|
||||
other environment variables you can configure.
|
||||
|
||||
### Using a Domain with automatic https
|
||||
|
||||
If you have a domain name and have correctly configured DNS then you can run the
|
||||
following command to make Baserow available at the domain with
|
||||
[automatic https](https://caddyserver.com/docs/automatic-https#overview) provided by
|
||||
Caddy.
|
||||
|
||||
> Append `,http://localhost` to BASEROW_CADDY_ADDRESSES if you still want to be able to
|
||||
> access your server from the machine it is running on using http://localhost. See
|
||||
> [Caddy's Address Docs](https://caddyserver.com/docs/caddyfile/concepts#addresses)
|
||||
> for all supported values for BASEROW_CADDY_ADDRESSES.
|
||||
|
||||
```bash
|
||||
docker run \
|
||||
-d \
|
||||
--name baserow \
|
||||
-e BASEROW_PUBLIC_URL=https://www.REPLACE_WITH_YOUR_DOMAIN.com \
|
||||
-e BASEROW_CADDY_ADDRESSES=https://www.REPLACE_WITH_YOUR_DOMAIN.com \
|
||||
-v baserow_data:/baserow/data \
|
||||
-p 80:80 \
|
||||
-p 443:443 \
|
||||
--restart unless-stopped \
|
||||
baserow/baserow:1.8.3
|
||||
```
|
||||
|
||||
### Behind a reverse proxy already handling ssl
|
||||
|
||||
```bash
|
||||
docker run \
|
||||
-d \
|
||||
--name baserow \
|
||||
-e BASEROW_PUBLIC_URL=https://www.yourdomain.com \
|
||||
-v baserow_data:/baserow/data \
|
||||
-p 80:80 \
|
||||
--restart unless-stopped \
|
||||
baserow/baserow:1.8.3
|
||||
```
|
||||
|
||||
### On a nonstandard HTTP port
|
||||
|
||||
```bash
|
||||
docker run \
|
||||
-d \
|
||||
--name baserow \
|
||||
-e BASEROW_PUBLIC_URL=https://www.yourdomain.com:3001 \
|
||||
-v baserow_data:/baserow/data \
|
||||
-p 3001:80 \
|
||||
--restart unless-stopped \
|
||||
baserow/baserow:1.8.3
|
||||
```
|
||||
|
||||
### With an external PostgresSQL server
|
||||
|
||||
```bash
|
||||
docker run \
|
||||
-d \
|
||||
--name baserow \
|
||||
-e BASEROW_PUBLIC_URL=https://www.yourdomain.com \
|
||||
-e DATABASE_HOST=TODO \
|
||||
-e DATABASE_NAME=TODO \
|
||||
-e DATABASE_USER=TODO \
|
||||
-e DATABASE_PASSWORD=TODO \
|
||||
-e DATABASE_PORT=TODO \
|
||||
-v baserow_data:/baserow/data \
|
||||
-p 80:80 \
|
||||
-p 443:443 \
|
||||
--restart unless-stopped \
|
||||
baserow/baserow:1.8.3
|
||||
```
|
||||
|
||||
### With an external Redis server
|
||||
|
||||
```bash
|
||||
docker run \
|
||||
-d \
|
||||
--name baserow \
|
||||
-e BASEROW_PUBLIC_URL=https://www.yourdomain.com \
|
||||
-e REDIS_HOST=TODO \
|
||||
-e REDIS_USER=TODO \
|
||||
-e REDIS_PASSWORD=TODO \
|
||||
-e REDIS_PORT=TODO \
|
||||
-e REDIS_PROTOCOL=TODO \
|
||||
-v baserow_data:/baserow/data \
|
||||
-p 80:80 \
|
||||
-p 443:443 \
|
||||
--restart unless-stopped \
|
||||
baserow/baserow:1.8.3
|
||||
```
|
||||
|
||||
### With an external email server
|
||||
|
||||
```bash
|
||||
docker run \
|
||||
-d \
|
||||
--name baserow \
|
||||
-e BASEROW_PUBLIC_URL=https://www.yourdomain.com \
|
||||
-e EMAIL_SMTP=True \
|
||||
-e EMAIL_SMTP_HOST=TODO \
|
||||
-e EMAIL_SMTP_PORT=TODO \
|
||||
-e EMAIL_SMTP_USER=TODO \
|
||||
-e EMAIL_SMTP_PASSWORD=TODO \
|
||||
-e EMAIL_SMTP_USE_TLS= \
|
||||
-v baserow_data:/baserow/data \
|
||||
-p 80:80 \
|
||||
-p 443:443 \
|
||||
--restart unless-stopped \
|
||||
baserow/baserow:1.8.3
|
||||
```
|
||||
|
||||
### Start just the embedded database
|
||||
|
||||
If you want to directly access the embedded Postgresql database then you can run:
|
||||
|
||||
```bash
|
||||
docker run -it \
|
||||
--rm \
|
||||
--name baserow \
|
||||
-p 5432:5432 \
|
||||
-v baserow_data:/baserow/data \
|
||||
baserow/baserow:1.8.3 \
|
||||
start-only-db
|
||||
# Now get the password from
|
||||
docker exec -it baserow cat /baserow/data/.pgpass
|
||||
# Finally connect on your host machine to the Baserow postgres database at port 5432
|
||||
# the password above with the username `baserow`.
|
||||
```
|
||||
|
||||
### Run a one off command on the database
|
||||
|
||||
If you want to run a one off backend command against your Baserow data volume without
|
||||
starting Baserow normally you can do so with the `backend-cmd-with-db` argument like so:
|
||||
|
||||
```bash
|
||||
docker run -it \
|
||||
--rm \
|
||||
--name baserow \
|
||||
-v baserow_data:/baserow/data \
|
||||
baserow/baserow:1.8.3 \
|
||||
backend-cmd-with-db manage dbshell
|
||||
```
|
||||
|
||||
## Backing up and Restoring Baserow
|
||||
|
||||
Baserow stores all of its persistent data in the `/baserow/data` directory by default.
|
||||
We strongly recommend you mount a docker volume into this location to persist
|
||||
Baserows data so you do not lose it if you accidentally delete your Baserow container.
|
||||
|
||||
> The backup and restore operations discussed below are best done on a Baserow server
|
||||
> which is not being used.
|
||||
|
||||
### Backup all of Baserow
|
||||
|
||||
This will backup:
|
||||
|
||||
1. Baserows postgres database (This will be a raw copy of the PGDATA dir and hence not
|
||||
easily portable, see the section below on how to backup just the postgres db in a
|
||||
more portable way.)
|
||||
2. The Caddy config and data, this will include any runtime config changes you might
|
||||
have made to the caddy server and any SSL certificates/keys automatically setup by
|
||||
Caddy.
|
||||
3. The Redis servers state. This is not strictly needed.
|
||||
|
||||
Otherwise if you remove the Baserow container you will lose all of your data.
|
||||
|
||||
The command below assumes you have been running Baserow with the
|
||||
`-v baserow_data:/baserow/data` volume. Please change this argument accordingly if you
|
||||
have mounted the /baserow/data folder differently.
|
||||
|
||||
```bash
|
||||
# Ensure Baserow is stopped first before taking a backup.
|
||||
docker stop baserow
|
||||
docker run --rm -v baserow_data:/baserow/data -v $PWD:/backup ubuntu tar cvf /backup/backup.tar /baserow/data
|
||||
```
|
||||
|
||||
### Restore all of Baserow
|
||||
|
||||
```bash
|
||||
# Ensure Baserow is stopped first before taking a backup.
|
||||
docker stop baserow
|
||||
docker run --rm -v baserow_data:/baserow/data -v $PWD:/backup ubuntu tar cvf /backup/backup.tar /baserow/data
|
||||
docker run --rm -v new_baserow_data_volume $PWD:/backup ubuntu bash -c "mkdir -p /baserow/data && cd /baserow/data && tar xvf /backup/backup.tar --strip 1"
|
||||
```
|
||||
|
||||
### Backup only Baserow's Postgres database
|
||||
|
||||
Please ensure you only back-up a Baserow database which is not actively being used
|
||||
by a running Baserow instance or any other process which is making changes to the
|
||||
database.
|
||||
|
||||
Baserow stores all of its own data in Postgres. To backup just this database you can run
|
||||
the command below.
|
||||
|
||||
```bash
|
||||
# First read the help message for this command
|
||||
docker run -it --rm -v baserow_data:/baserow/data baserow/baserow:1.8.3 \
|
||||
backend-cmd-with-db backup
|
||||
|
||||
# By default backs up to the backups folder in the baserow_data volume.
|
||||
docker run -it --rm -v baserow_data:/baserow/data baserow/baserow:1.8.3 \
|
||||
backend-cmd-with-db backup -f /baserow/data/backups/backup.tar.gz
|
||||
|
||||
# Or backup to a file on your host instead run something like:
|
||||
docker run -it --rm -v baserow_data:/baserow/data -v $PWD:/baserow/host \
|
||||
baserow/baserow:1.8.3 backend-cmd-with-db backup -f /baserow/host/backup.tar.gz
|
||||
```
|
||||
|
||||
### Restore only Baserow's Postgres Database
|
||||
|
||||
When restoring Baserow you must ensure you are restoring into a brand new Baserow data
|
||||
volume.
|
||||
|
||||
```bash
|
||||
docker run -it --rm \
|
||||
-v old_baserow_data_volume_containing_the_backup_tar_gz:/baserow/old_data \
|
||||
-v new_baserow_data_volume_to_restore_into:/baserow/data \
|
||||
baserow backend-cmd-with-db restore -f /baserow/old_data/backup.tar.gz
|
||||
|
||||
# Or to restore from a file on your host instead run something like:
|
||||
docker run -it --rm \
|
||||
-v baserow_data:/baserow/data -v \
|
||||
$(pwd):/baserow/host \
|
||||
baserow backend-cmd-with-db restore -f /baserow/host/backup.tar.gz
|
||||
```
|
||||
|
||||
## Running healthchecks on Baserow
|
||||
|
||||
The Dockerfile already defines a HEALTHCHECK command which will be used by software
|
||||
that supports it. However if you wish to trigger a healthcheck yourself on a running
|
||||
Baserow container then you can run:
|
||||
|
||||
```bash
|
||||
docker exec baserow ./baserow.sh backend-cmd backend-healthcheck
|
||||
# Run the below to see all available healthchecks
|
||||
docker exec baserow ./baserow.sh backend-cmd help
|
||||
```
|
||||
|
||||
## Running Baserow or Django management commands
|
||||
|
||||
You can run management commands on an existing Baserow container called baserow by
|
||||
running the following to see the available commands:
|
||||
|
||||
```bash
|
||||
docker exec baserow ./baserow.sh backend-cmd manage
|
||||
# For example you could migrate the database of a running Baserow using:
|
||||
docker exec baserow ./baserow.sh backend-cmd manage migrate
|
||||
```
|
||||
|
||||
## Customizing Baserow
|
||||
|
||||
### Mounting in a config file
|
||||
|
||||
Baserow will automatically source any `.sh` files found in `/baserow/supervisor/env/` or
|
||||
`/baserow/data/env/` on startup. Use this to create a single config file to configure
|
||||
your Baserow like so:
|
||||
|
||||
```bash
|
||||
custom_baserow_conf.sh << EOF
|
||||
export BASEROW_PUBLIC_URL=todo
|
||||
export BASEROW_CADDY_ADDRESSES=todo
|
||||
|
||||
# You can perform any Bash logic required in here to setup Baserow conditionally.
|
||||
EOF
|
||||
|
||||
docker run \
|
||||
-d \
|
||||
--name baserow \
|
||||
-e BASEROW_PUBLIC_URL=http://localhost \
|
||||
-v $PWD/custom_baserow_conf.sh /baserow/supervisor/custom_baserow_conf.sh \
|
||||
-v baserow_data:/baserow/data \
|
||||
-p 80:80 \
|
||||
-p 443:443 \
|
||||
--restart unless-stopped \
|
||||
baserow/baserow:1.8.3
|
||||
```
|
||||
|
||||
Or you can just store it directly in the volume at `baserow_data/env` meaning it will
|
||||
be loaded whenever you mount in this data volume.
|
||||
|
||||
### Building your own image from Baserow
|
||||
|
||||
```dockerfile
|
||||
FROM baserow/baserow:1.8.3
|
||||
|
||||
# Any .sh files found in /baserow/supervisor/env/ will be sourced and loaded at startup
|
||||
# useful for storing your own environment variable overrides.
|
||||
COPY custom_env.sh /baserow/supervisor/env/custom_env.sh
|
||||
|
||||
# Set the DATA_DIR environment variable to change where Baserow stores its persistant
|
||||
# data. At startup Baserow will attempt to chown and setup this folder correctly.
|
||||
ENV DATA_DIR=/baserow/data
|
||||
|
||||
# This image bakes in its own default user with UID/GID of 9999:9999 by default. To
|
||||
# Set this to change the user Baserow will run its Caddy, backend, Celery and
|
||||
# web-frontend services as. However be warned, the default entrypoint needs to be run
|
||||
# as root so using USER may break things.
|
||||
ENV DOCKER_USER=baserow_docker_user
|
||||
```
|
||||
@@ -12,20 +12,22 @@ show_help() {
|
||||
echo """
|
||||
Usage: docker run --rm -it [-v baserow:$DATA_DIR] baserow COMMAND_FROM_BELOW
|
||||
Commands
|
||||
start : Launches baserow with all services running internally in a single
|
||||
container.
|
||||
web-frontend : Show all available one-off web-frontend commands.
|
||||
backend : Show all available one-off backend commands.
|
||||
backend_with_db : Starts the embedded postgres database and then runs any supplied
|
||||
backend command normally. Useful for running one off commands that
|
||||
require the database like backups and restores.
|
||||
db_only : Starts up only the embedded postgres server and makes it available
|
||||
for external connections if you expose port 5432 using
|
||||
the extra docker run argument of '-p 5432:5432'. Useful for if you
|
||||
need to manually inspect Baserows database etc.
|
||||
> You can find the postgres users password by separately running
|
||||
> docker exec -it baserow cat /baserow/data/.pgpass
|
||||
help : Show this message.
|
||||
start : Launches baserow with all services running internally in a single
|
||||
container.
|
||||
start-only-db : Starts up only the embedded postgres server and makes it available
|
||||
for external connections if you expose port 5432 using
|
||||
the extra docker run argument of '-p 5432:5432'. Useful for if you
|
||||
need to manually inspect Baserows database etc.
|
||||
> You can find the postgres users password by separately running
|
||||
> docker exec -it baserow cat /baserow/data/.pgpass
|
||||
|
||||
backend-cmd CMD : Runs the specified backend command, use the help command to
|
||||
show all available.
|
||||
backend-cmd-with-db : Starts the embedded postgres database and then runs any supplied
|
||||
backend command normally. Useful for running one off commands
|
||||
that require the database like backups and restores.
|
||||
web-frontend-cmd CMD : Runs the specified web-frontend command, use help to show all
|
||||
help : Show this message.
|
||||
"""
|
||||
}
|
||||
if [[ -z "${1:-}" ]]; then
|
||||
@@ -34,6 +36,7 @@ if [[ -z "${1:-}" ]]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
# From https://github.com/docker-library/postgres/blob/master/docker-entrypoint.sh
|
||||
# usage: file_env VAR [DEFAULT]
|
||||
# ie: file_env 'XYZ_DB_PASSWORD' 'example'
|
||||
@@ -201,27 +204,25 @@ fi
|
||||
# directory as a volume, which will not be auto setup by docker with the containers
|
||||
# underlying structure.
|
||||
|
||||
if [[ -z "${DATA_DIR_ALREADY_SETUP:-}" ]]; then
|
||||
if [[ -z "${DISABLE_EMBEDDED_REDIS:-}" ]]; then
|
||||
mkdir -p "$DATA_DIR"/redis
|
||||
chown -R redis:redis "$DATA_DIR"/redis
|
||||
fi
|
||||
|
||||
if [[ -z "${DISABLE_EMBEDDED_PSQL:-}" ]]; then
|
||||
mkdir -p "$DATA_DIR"/postgres
|
||||
chown -R postgres:postgres "$DATA_DIR"/postgres
|
||||
fi
|
||||
|
||||
mkdir -p "$DATA_DIR"/caddy
|
||||
chown -R "$DOCKER_USER": "$DATA_DIR"/caddy
|
||||
mkdir -p "$DATA_DIR"/media
|
||||
chown -R "$DOCKER_USER": "$DATA_DIR"/media
|
||||
mkdir -p "$DATA_DIR"/env
|
||||
chown -R "$DOCKER_USER": "$DATA_DIR"/env
|
||||
mkdir -p "$DATA_DIR"/backups
|
||||
chown -R "$DOCKER_USER": "$DATA_DIR"/backups
|
||||
if [[ -z "${DISABLE_EMBEDDED_REDIS:-}" ]]; then
|
||||
mkdir -p "$DATA_DIR"/redis
|
||||
chown -R redis:redis "$DATA_DIR"/redis
|
||||
fi
|
||||
|
||||
if [[ -z "${DISABLE_EMBEDDED_PSQL:-}" ]]; then
|
||||
mkdir -p "$DATA_DIR"/postgres
|
||||
chown -R postgres:postgres "$DATA_DIR"/postgres
|
||||
fi
|
||||
|
||||
mkdir -p "$DATA_DIR"/caddy
|
||||
chown -R "$DOCKER_USER": "$DATA_DIR"/caddy
|
||||
mkdir -p "$DATA_DIR"/media
|
||||
chown -R "$DOCKER_USER": "$DATA_DIR"/media
|
||||
mkdir -p "$DATA_DIR"/env
|
||||
chown -R "$DOCKER_USER": "$DATA_DIR"/env
|
||||
mkdir -p "$DATA_DIR"/backups
|
||||
chown -R "$DOCKER_USER": "$DATA_DIR"/backups
|
||||
|
||||
# ========================
|
||||
# = COMMAND LINE ARG HANDLER
|
||||
# ========================
|
||||
@@ -229,7 +230,12 @@ fi
|
||||
docker_safe_run(){
|
||||
# When running one off commands we want to become the docker user + ensure signals
|
||||
# are handled correctly. This function achieves both by using tini and gosu.
|
||||
exec tini -s -- gosu "$DOCKER_USER" "$@"
|
||||
CURRENT_USER=$(whoami)
|
||||
if [[ "$CURRENT_USER" != "$DOCKER_USER" ]]; then
|
||||
exec tini -s -- gosu "$DOCKER_USER" "$@"
|
||||
else
|
||||
exec tini -s -- "$@"
|
||||
fi
|
||||
}
|
||||
|
||||
check_can_start_embedded_services(){
|
||||
@@ -241,7 +247,7 @@ check_can_start_embedded_services(){
|
||||
# parent processes id to be 1. If we are being execed in an existing container
|
||||
# these checks will fail.
|
||||
if [[ $$ -ne 1 || $(pgrep -f "redis") || $(pgrep -f "postgres") ]]; then
|
||||
echo -e "\e[31mPlease do not run the db_only or backend_with_db commands in "\
|
||||
echo -e "\e[31mPlease do not run the start-only-db or backend-cmd-with-db commands in "\
|
||||
"an existing Baserow container as they are designed tif [[ -z "${DISABLE_EMBEDDED_REDIS:-}" ]]; then
|
||||
mkdir -p "$DATA_DIR"/redis
|
||||
chown -R redis:redis "$DATA_DIR"/redis
|
||||
@@ -262,7 +268,7 @@ case "$1" in
|
||||
start)
|
||||
exec /baserow/supervisor/start.sh "${@:2}"
|
||||
;;
|
||||
backend_with_db)
|
||||
backend-cmd-with-db)
|
||||
check_can_start_embedded_services
|
||||
|
||||
export SUPERVISOR_CONF=/baserow/supervisor/supervisor_include_only.conf
|
||||
@@ -281,7 +287,7 @@ case "$1" in
|
||||
echo "=================================="
|
||||
finish
|
||||
;;
|
||||
db_only)
|
||||
start-only-db)
|
||||
check_can_start_embedded_services
|
||||
# Run this temporary server with its own pg_hba.conf so if the above check somehow
|
||||
# fails we don't accidentally edit the pg_hba.conf of the normal embedded postgres
|
||||
@@ -296,7 +302,7 @@ case "$1" in
|
||||
export EXTRA_POSTGRES_ARGS="-c listen_addresses='*' -c hba_file=$TMP_HBA_FILE"
|
||||
export SUPERVISOR_CONF=/baserow/supervisor/supervisor_include_only.conf
|
||||
startup_echo "INFO: You can find the baserow database user's password by running"
|
||||
startup_echo "docker exec -it this_containers_name cat $DATA_DIR/.pgpass"
|
||||
startup_echo "docker exec -it baserow cat $DATA_DIR/.pgpass"
|
||||
exec /baserow/supervisor/start.sh "${@:2}"
|
||||
;;
|
||||
backend)
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
Welcome to Baserow. See https://baserow.io/installation/install-with-docker/ for detailed instructions on
|
||||
how to use this Docker image.
|
||||
@@ -27,7 +27,7 @@ wait_for_baserow() {
|
||||
sleep 1
|
||||
done
|
||||
echo "======================================================================="
|
||||
echo -e "\e[32mBaserow is now available at ${BASEROW_PUBLIC_URLS}\e[0m"
|
||||
echo -e "\e[32mBaserow is now available at ${BASEROW_PUBLIC_URL}\e[0m"
|
||||
echo "======================================================================="
|
||||
|
||||
# Now go into warning mode where we loop and inform about changes in health.
|
||||
|
||||
@@ -27,10 +27,12 @@ export DATABASE_PORT="${DATABASE_PORT:-5432}"
|
||||
export PGDATA="$DATA_DIR/postgres/"
|
||||
export EXTRA_POSTGRES_ARGS="${EXTRA_POSTGRES_ARGS:-}"
|
||||
export DISABLE_EMBEDDED_PSQL="${DISABLE_EMBEDDED_PSQL:-}"
|
||||
export BASEROW_RUN_MINIMAL="${BASEROW_RUN_MINIMAL:-}"
|
||||
|
||||
export REDIS_HOST="${REDIS_HOST:-embed}"
|
||||
|
||||
export BASEROW_PUBLIC_URLS="${BASEROW_PUBLIC_URLS:-http://localhost, :80}"
|
||||
export BASEROW_PUBLIC_URL="${BASEROW_PUBLIC_URL:-http://localhost}"
|
||||
export BASEROW_CADDY_ADDRESSES="${BASEROW_CADDY_ADDRESSES:-:80}"
|
||||
export BASEROW_CADDY_GLOBAL_CONF="${BASEROW_CADDY_GLOBAL_CONF:-}"
|
||||
|
||||
|
||||
|
||||
@@ -15,48 +15,8 @@ cat << EOF
|
||||
╚═════╝ ╚═╝ ╚═╝╚══════╝╚══════╝╚═╝ ╚═╝ ╚═════╝ ╚══╝╚══╝ ╚═╝╚═╝ ╚════╝ ╚═╝╚══════╝
|
||||
|
||||
=========================================================================================
|
||||
|
||||
This is the Baserow all in one Docker image. By default it runs all Baserow services
|
||||
within a single container.
|
||||
|
||||
=== Customization ==
|
||||
|
||||
======== USING AN EXTERNAL POSTGRESQL =======
|
||||
|
||||
Set DATABASE_HOST, DATABASE_PASSWORD, DATABASE_USER to configure Baserow to use an
|
||||
external postgres database instead of using its own internal one.
|
||||
|
||||
======== USING AN EXTERNAL REDIS =======
|
||||
|
||||
Set REDIS_HOST to configure Baserow to use an external redis instead of using its own
|
||||
internal one.
|
||||
|
||||
======== SETTING BASEROW_PUBLIC_URLS AND AUTOMATIC HTTPS =========
|
||||
|
||||
Set BASEROW_PUBLIC_URLS if you want Baserow to be available at a configured domain name. Internally
|
||||
Baserow is using a caddy reverse proxy which will automatically provision SSL
|
||||
certificates if BASEROW_PUBLIC_URLS is publicly accessible by certbot. For this to work you must
|
||||
ensure:
|
||||
|
||||
* You are running this docker container with ports 80 and 443 exposed and bound ( -p 80:80 -p 443:443)
|
||||
* You are running this docker container with the BASEROW_PUBLIC_URLS env variable set (-e BASEROW_PUBLIC_URLS=www.yourbaserow.com)
|
||||
* Your domain's A/AAAA records point to your server
|
||||
* Ports 80 and 443 are open externally
|
||||
|
||||
See https://caddyserver.com/docs/automatic-https for more info
|
||||
|
||||
======== FOR MORE HELP ========
|
||||
|
||||
For help, feedback and suggestions please post at https://community.baserow.io
|
||||
|
||||
TODO
|
||||
1. Ensure BASEROW_PUBLIC_URLS variable + all the others make sense
|
||||
2. Provide a better way of managing secrets
|
||||
-> postgres password
|
||||
-> django secret key
|
||||
3. Cleanup docs
|
||||
4. Warn if running in local mode and potentially exposed to the internet.
|
||||
EOF
|
||||
cat /baserow/supervisor/STARTUP_README.md
|
||||
|
||||
startup_echo(){
|
||||
./baserow/supervisor/wrapper.sh GREEN STARTUP echo -e "\e[32m$*\e[0m"
|
||||
@@ -111,10 +71,10 @@ fi
|
||||
# ========================
|
||||
# = LOG ABOUT URL
|
||||
# ========================
|
||||
if [[ "$BASEROW_PUBLIC_URLS" == "http://localhost"* ]]; then
|
||||
startup_echo "No BASEROW_PUBLIC_URLS environment variable provided. Starting baserow locally at http://localhost without automatic https."
|
||||
if [[ "$BASEROW_PUBLIC_URL" == "http://localhost"* ]]; then
|
||||
startup_echo "No BASEROW_PUBLIC_URL environment variable provided. Starting baserow locally at http://localhost without automatic https."
|
||||
else
|
||||
startup_echo "Starting Baserow using addresses $BASEROW_PUBLIC_URLS, if any are https automatically Caddy will attempt to setup HTTPS automatically."
|
||||
startup_echo "Starting Baserow using addresses $BASEROW_PUBLIC_URL, if any are https automatically Caddy will attempt to setup HTTPS automatically."
|
||||
fi
|
||||
|
||||
# ========================
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
[supervisord]
|
||||
# The supervisord process needs to remain as root so it can change user to the
|
||||
# individual process users below.
|
||||
user = root
|
||||
nodaemon = true
|
||||
logfile=/dev/stdout
|
||||
logfile_maxbytes=0
|
||||
|
||||
@@ -44,6 +44,7 @@ if [[ -n "${NO_COLOR:-}" ]]; then
|
||||
NC=
|
||||
fi
|
||||
|
||||
if [[ -z "$BASEROW_RUN_MINIMAL" ]]; then
|
||||
# We are going to replace this wrapper.sh process with the process defined by the
|
||||
# args on the last line with the exec "$@". This is important as for signal handling
|
||||
# to work properly supervisord needs to be the direct parent of the supervised process.
|
||||
@@ -54,4 +55,5 @@ fi
|
||||
# still becoming a direct child of supervisord.
|
||||
exec > >(ets -f "[$PREFIX][%Y-%m-%d %H:%M:%S]" | sed -u $"s,.*,${COLOR}&${NC},")
|
||||
exec 2> >(ets -f "[$PREFIX][%Y-%m-%d %H:%M:%S]" | sed -u $"s,.*,${COLOR}&${NC},")
|
||||
fi
|
||||
exec "$@"
|
||||
@@ -8,7 +8,7 @@
|
||||
"contactEmail": "bram@baserow.io",
|
||||
"icon": "file://logo.png",
|
||||
"tags": ["no-code", "nocode", "database", "data", "collaborate", "airtable"],
|
||||
"version": "1.8.2",
|
||||
"version": "1.8.3",
|
||||
"healthCheckPath": "/api/_health",
|
||||
"httpPort": 80,
|
||||
"addons": {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
ARG FROM_IMAGE=baserow/baserow:1.8.2
|
||||
ARG FROM_IMAGE=baserow/baserow:1.8.3
|
||||
# This is pinned as version pinning is done by the CI setting FROM_IMAGE.
|
||||
# hadolint ignore=DL3006
|
||||
FROM $FROM_IMAGE as image_base
|
||||
|
||||
@@ -1,11 +1,32 @@
|
||||
**Build**
|
||||
# Baserow's Cloudron image
|
||||
|
||||
```
|
||||
$ docker build -t registry.gitlab.com/bramw/baserow/cloudron:1.8.2 .
|
||||
```
|
||||
This is the Baserow maintained [Cloudron Image](https://cloudron.io).
|
||||
|
||||
**Push**
|
||||
Please see our [Install on Cloudron](https://baserow.io/docs/installation/install-on-cloudron)
|
||||
guide for more details.
|
||||
|
||||
```
|
||||
$ docker push registry.gitlab.com/bramw/baserow/cloudron:1.8.2
|
||||
```
|
||||
## About Baserow
|
||||
|
||||
* A spreadsheet database hybrid combining ease of use and powerful data organization.
|
||||
* Easily self-hosted with no storage restrictions or sign-up on https://baserow.io to
|
||||
get started immediately.
|
||||
* Alternative to Airtable.
|
||||
* Open-core with all non-premium features under
|
||||
the [MIT License](https://choosealicense.com/licenses/mit/) allowing commercial and
|
||||
private use.
|
||||
* Headless and API first.
|
||||
* Uses popular frameworks and tools like [Django](https://www.djangoproject.com/),
|
||||
[Vue.js](https://vuejs.org/) and [PostgreSQL](https://www.postgresql.org/).
|
||||
|
||||
## Quick Reference
|
||||
|
||||
* **Maintained By**: [baserow.io](https://baserow.io/contact)
|
||||
* **Get Support At**: [The Baserow Community Forums](https://community.baserow.io)
|
||||
* **Source Code Available At**: [gitlab.com/bramw/baserow](https://gitlab.com/bramw/baserow)
|
||||
* **Docs At**: [baserow.io/docs](https://baserow.io/docs)
|
||||
* **License**: Open-Core with all non-premium code under the MIT license.
|
||||
|
||||
## Supported tags and Dockerfile Links
|
||||
|
||||
* [`1.8.3`](https://gitlab.com/bramw/baserow/-/blob/1.8.3/deploy/cloudron/Dockerfile)
|
||||
* [`develop_latest`](https://gitlab.com/bramw/baserow/-/blob/1.8.3/deploy/cloudron/Dockerfile)
|
||||
@@ -1,80 +0,0 @@
|
||||
ARG FROM_IMAGE=baserow/baserow:1.9
|
||||
FROM $FROM_IMAGE as image_base
|
||||
FROM cloudron/base:3.0.0@sha256:455c70428723e3a823198c57472785437eb6eab082e79b3ff04ea584faf46e92
|
||||
|
||||
ENV DOCKER_USER=cloudron
|
||||
ENV DATA_DIR=/app/data
|
||||
ENV POSTGRES_VERSION=14
|
||||
ENV POSTGRES_LOCATION=/etc/postgresql/14/main/
|
||||
|
||||
# ========================
|
||||
# = INSTALL DEPENDENCIES
|
||||
# ========================
|
||||
RUN apt-get update && apt-get upgrade -y && \
|
||||
DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt-get install --no-install-recommends -y \
|
||||
make supervisor curl gnupg2 \
|
||||
build-essential \
|
||||
libpq-dev \
|
||||
redis-server \
|
||||
python3 \
|
||||
python3-pip \
|
||||
python3-dev \
|
||||
python3-venv \
|
||||
ca-certificates \
|
||||
tini \
|
||||
gosu
|
||||
|
||||
RUN curl -fsSL https://deb.nodesource.com/setup_12.x | bash -
|
||||
|
||||
RUN apt-get install --no-install-recommends -y nodejs && rm -rf /var/cache/apt /var/lib/apt/lists
|
||||
|
||||
# ========================
|
||||
# = BASEROW_CADDY
|
||||
# ========================
|
||||
RUN curl -o caddy.tar.gz -sL https://github.com/caddyserver/caddy/releases/download/v2.4.6/caddy_2.4.6_linux_amd64.tar.gz && \
|
||||
tar -xf caddy.tar.gz && \
|
||||
mv caddy /usr/bin/ && \
|
||||
rm caddy.tar.gz
|
||||
|
||||
# ========================
|
||||
# = SUPERVISOR
|
||||
# ========================
|
||||
# Ensure supervisor logs to stdout
|
||||
RUN ln -sf /dev/stdout /var/log/supervisor/supervisord.log
|
||||
|
||||
# ========================
|
||||
# = REDIS
|
||||
# ========================
|
||||
# Ensure redis is not running in daemon mode as supervisor will supervise it directly
|
||||
# Point redis at our data dir
|
||||
# Ensure redis logs to stdout by removing any logfile statements
|
||||
# Sedding changes the owner, change it back.
|
||||
RUN usermod -a -G tty redis && \
|
||||
sed -i 's/daemonize yes/daemonize no/g' /etc/redis/redis.conf && \
|
||||
sed -i 's/daemonize no/daemonize no\nbind 127.0.0.1/g' /etc/redis/redis.conf && \
|
||||
sed -i '/^logfile/d' /etc/redis/redis.conf && \
|
||||
chown redis:redis /etc/redis/redis.conf
|
||||
|
||||
# ========================
|
||||
# = BASEROW
|
||||
# ========================
|
||||
COPY --chown=cloudron:cloudron --from=image_base /baserow/ /baserow/
|
||||
# The copy above will have chowned the supervisor folder to cloudron user when it should
|
||||
# be root.
|
||||
RUN chown -R root:root /baserow/supervisor
|
||||
# Virtualenvs are not portable and especially not so between image_base which is debian
|
||||
# and focal (cloudron/base). We install our python venv here instead.
|
||||
RUN rm /baserow/venv -rf && \
|
||||
python3 -m pip install --no-cache-dir --no-warn-script-location --disable-pip-version-check --upgrade pip==22.0.3 && \
|
||||
python3 -m pip install --no-cache-dir --no-warn-script-location --upgrade virtualenv==20.13.1 && \
|
||||
python3 -m virtualenv /baserow/venv
|
||||
# hadolint ignore=SC1091
|
||||
RUN . /baserow/venv/bin/activate && pip3 install --no-cache-dir -r /baserow/backend/requirements/base.txt
|
||||
|
||||
RUN cd /baserow/web-frontend && yarn install && yarn build && chown cloudron: -R /baserow/web-frontend/
|
||||
|
||||
COPY deploy/cloudron/cloudron_env.sh /baserow/supervisor/env/cloudron_env.sh
|
||||
COPY deploy/all-in-one/baserow.sh /baserow.sh
|
||||
|
||||
ENTRYPOINT ["/baserow.sh"]
|
||||
CMD ["start"]
|
||||
@@ -10,9 +10,8 @@ export DATABASE_NAME=$CLOUDRON_POSTGRESQL_DATABASE
|
||||
export DATABASE_HOST=$CLOUDRON_POSTGRESQL_HOST
|
||||
export DATABASE_USER=$CLOUDRON_POSTGRESQL_USERNAME
|
||||
export DATABASE_PORT=$CLOUDRON_POSTGRESQL_PORT
|
||||
export BASEROW_PUBLIC_URLS=${BASEROW_PUBLIC_URLS:-https://$CLOUDRON_APP_DOMAIN, :80}
|
||||
# Disable Caddy's auto https as cloudron does it for us.
|
||||
export BASEROW_CADDY_GLOBAL_CONF="auto_https off"
|
||||
export BASEROW_PUBLIC_URL=${BASEROW_PUBLIC_URL:-https://$CLOUDRON_APP_DOMAIN}
|
||||
export BASEROW_CADDY_ADDRESSES=${BASEROW_CADDY_ADDRESSES:-:80}
|
||||
|
||||
export DJANGO_SETTINGS_MODULE='baserow.config.settings.base'
|
||||
export DATA_DIR=/app/data
|
||||
|
||||
@@ -21,6 +21,7 @@ services:
|
||||
- CLOUDRON_MAIL_SMTP_USERNAME=mailhog
|
||||
- CLOUDRON_MAIL_SMTP_PASSWORD=mailhog
|
||||
- CLOUDRON_MAIL_SMTP_PORT=1025
|
||||
- BASEROW_PUBLIC_URL=http://localhost
|
||||
ports:
|
||||
- "80:80"
|
||||
- "443:443"
|
||||
|
||||
@@ -10,7 +10,8 @@ services:
|
||||
args:
|
||||
- FROM_IMAGE=baserow
|
||||
environment:
|
||||
- BASEROW_PUBLIC_URLS=http://localhost, :80
|
||||
- PORT=80
|
||||
- BASEROW_PUBLIC_URL=http://localhost
|
||||
- DATABASE_URL=postgresql://baserow:baserow@db:5432/baserow
|
||||
- HEROKU_APP_NAME=test
|
||||
- REDIS_URL=redis://:baserow@redis:6379
|
||||
@@ -19,6 +20,7 @@ services:
|
||||
- MAILGUN_SMTP_LOGIN=mailhog
|
||||
- MAILGUN_SMTP_PASSWORD=mailhog
|
||||
- MAILGUN_SMTP_PORT=1025
|
||||
- BASEROW_AMOUNT_OF_WORKERS
|
||||
ports:
|
||||
- "80:80"
|
||||
- "443:443"
|
||||
|
||||
Regular → Executable
+7
-7
@@ -2,15 +2,11 @@
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
# Heroku is configured with the non-plural version of this variable.
|
||||
# Default to using it but also allow the user to set BASEROW_PUBLIC_URLS.
|
||||
BASEROW_PUBLIC_URL=${BASEROW_PUBLIC_URL:-https://$HEROKU_APP_NAME.herokuapp.com}
|
||||
export BASEROW_PUBLIC_URLS="${BASEROW_PUBLIC_URLS:-$BASEROW_PUBLIC_URL, :$PORT}"
|
||||
# Only listen to the port with caddy to disable its automatic ssl
|
||||
export BASEROW_CADDY_GLOBAL_CONF="auto_https off"
|
||||
export BASEROW_PUBLIC_URL=${BASEROW_PUBLIC_URL:-https://$HEROKU_APP_NAME.herokuapp.com}
|
||||
export BASEROW_CADDY_ADDRESSES=":$PORT"
|
||||
export REDIS_URL=${REDIS_TLS_URL:-$REDIS_URL}
|
||||
export DJANGO_SETTINGS_MODULE='baserow.config.settings.heroku'
|
||||
export BASEROW_RUN_MINIMAL_CELERY=yes
|
||||
export BASEROW_RUN_MINIMAL=yes
|
||||
export DISABLE_EMBEDDED_PSQL=yes
|
||||
export DISABLE_EMBEDDED_REDIS=yes
|
||||
export SYNC_TEMPLATES_ON_STARTUP="${SYNC_TEMPLATES_ON_STARTUP:-no}"
|
||||
@@ -28,3 +24,7 @@ export EMAIL_SMTP_HOST=$MAILGUN_SMTP_SERVER
|
||||
export EMAIL_SMTP_PORT=$MAILGUN_SMTP_PORT
|
||||
export EMAIL_SMTP_USER=$MAILGUN_SMTP_LOGIN
|
||||
export EMAIL_SMTP_PASSWORD=$MAILGUN_SMTP_PASSWORD
|
||||
# Heroku generates a random user who runs this container, set DOCKER_USER to that user
|
||||
# so we can setup the DATA_DIR.
|
||||
DOCKER_USER=$(whoami)
|
||||
export DOCKER_USER
|
||||
@@ -0,0 +1,33 @@
|
||||
# Baserow's Standalone Backend Image
|
||||
|
||||
This image runs only the Baserow Backend service and is intended for use by advanced
|
||||
users. Please instead use the `baserow/baserow` image if you want a simpler setup.
|
||||
|
||||
Please see our [Install using Standalone Images](https://baserow.io/docs/installation/install-using-standalone-images)
|
||||
guide for more details.
|
||||
|
||||
## About Baserow
|
||||
|
||||
* A spreadsheet database hybrid combining ease of use and powerful data organization.
|
||||
* Easily self-hosted with no storage restrictions or sign-up on https://baserow.io to
|
||||
get started immediately.
|
||||
* Alternative to Airtable.
|
||||
* Open-core with all non-premium features under
|
||||
the [MIT License](https://choosealicense.com/licenses/mit/) allowing commercial and
|
||||
private use.
|
||||
* Headless and API first.
|
||||
* Uses popular frameworks and tools like [Django](https://www.djangoproject.com/),
|
||||
[Vue.js](https://vuejs.org/) and [PostgreSQL](https://www.postgresql.org/).
|
||||
|
||||
## Quick Reference
|
||||
|
||||
* **Maintained By**: [baserow.io](https://baserow.io/contact)
|
||||
* **Get Support At**: [The Baserow Community Forums](https://community.baserow.io)
|
||||
* **Source Code Available At**: [gitlab.com/bramw/baserow](https://gitlab.com/bramw/baserow)
|
||||
* **Docs At**: [baserow.io/docs](https://baserow.io/docs)
|
||||
* **License**: Open-Core with all non-premium code under the MIT license.
|
||||
|
||||
## Supported tags and Dockerfile Links
|
||||
|
||||
* [`1.8.3`](https://gitlab.com/bramw/baserow/-/blob/1.8.3/backend/Dockerfile)
|
||||
* [`develop_latest`](https://gitlab.com/bramw/baserow/-/blob/develop/backend/Dockerfile)
|
||||
@@ -0,0 +1,34 @@
|
||||
# Baserow's Standalone Webfrontend Image
|
||||
|
||||
This image runs only the Baserow Web-frontend service and is intended for use by
|
||||
advanced users. Please instead use the `baserow/baserow` image if you want a simpler \
|
||||
setup.
|
||||
|
||||
Please see our [Install using Standalone Images](https://baserow.io/docs/installation/install-using-standalone-images)
|
||||
guide for more details.
|
||||
|
||||
## About Baserow
|
||||
|
||||
* A spreadsheet database hybrid combining ease of use and powerful data organization.
|
||||
* Easily self-hosted with no storage restrictions or sign-up on https://baserow.io to
|
||||
get started immediately.
|
||||
* Alternative to Airtable.
|
||||
* Open-core with all non-premium features under
|
||||
the [MIT License](https://choosealicense.com/licenses/mit/) allowing commercial and
|
||||
private use.
|
||||
* Headless and API first.
|
||||
* Uses popular frameworks and tools like [Django](https://www.djangoproject.com/),
|
||||
[Vue.js](https://vuejs.org/) and [PostgreSQL](https://www.postgresql.org/).
|
||||
|
||||
## Quick Reference
|
||||
|
||||
* **Maintained By**: [baserow.io](https://baserow.io/contact)
|
||||
* **Get Support At**: [The Baserow Community Forums](https://community.baserow.io)
|
||||
* **Source Code Available At**: [gitlab.com/bramw/baserow](https://gitlab.com/bramw/baserow)
|
||||
* **Docs At**: [baserow.io/docs](https://baserow.io/docs)
|
||||
* **License**: Open-Core with all non-premium code under the MIT license.
|
||||
|
||||
## Supported tags and Dockerfile Links
|
||||
|
||||
* [`1.8.3`](https://gitlab.com/bramw/baserow/-/blob/1.8.3/web-frontend/Dockerfile)
|
||||
* [`develop_latest`](https://gitlab.com/bramw/baserow/-/blob/develop/web-frontend/Dockerfile)
|
||||
@@ -314,7 +314,7 @@ export COMPOSE_DOCKER_CLI_BUILD=1
|
||||
export DOCKER_BUILDKIT=1
|
||||
|
||||
export WEB_FRONTEND_PORT=${WEB_FRONTEND_PORT:-3000}
|
||||
export BASEROW_PUBLIC_URLS=${BASEROW_PUBLIC_URLS:-http://localhost:$WEB_FRONTEND_PORT, :$WEB_FRONTEND_PORT}
|
||||
export BASEROW_PUBLIC_URL=${BASEROW_PUBLIC_URL:-http://localhost:$WEB_FRONTEND_PORT}
|
||||
|
||||
|
||||
echo "./dev.sh running docker-compose commands:
|
||||
|
||||
+63
-50
@@ -3,50 +3,65 @@ version: "3.4"
|
||||
# == README ==
|
||||
#
|
||||
# To use this docker-compose.yml to run Baserow you must set the three required
|
||||
# environment variables in the x-backend-required-variables section below and review
|
||||
# the variables in the x-common-important-variables section. If you receive the
|
||||
# environment variables in the `x-backend-required-variables` section below and review
|
||||
# the variables in the `x-common-important-variables` section. If you receive the
|
||||
# following error it is because you need to set the required environment variables
|
||||
# first:
|
||||
#
|
||||
# ```
|
||||
# ERROR: Missing mandatory value for "environment" option interpolating
|
||||
# ```
|
||||
#
|
||||
# If you are upgrading from Baserow 1.8.2 or earlier please read the additional section
|
||||
# below.
|
||||
# If you are upgrading from Baserow 1.8.2 or earlier please read the additional section
|
||||
# below.
|
||||
#
|
||||
# === How to set these environment variables ===
|
||||
# See [Configuring Baserow](configuration.md) for information on the
|
||||
# other environment variables you can configure.
|
||||
#
|
||||
# You can set these variables by using docker-compose env file
|
||||
# ## How to set environment variables
|
||||
#
|
||||
# You can set these variables by using docker-compose env file
|
||||
# (https://docs.docker.com/compose/environment-variables/#the-env-file):
|
||||
# 1. Copy the '.env.example' file in this directory to '.env':
|
||||
# cp .env.example .env
|
||||
# 2. Edit '.env' and provide values for the missing environment variables.
|
||||
# 3. docker-compose up
|
||||
# 1. Copy the `.env.example` file found in the root of Baserows repository
|
||||
# (https://gitlab.com/bramw/baserow/-/blob/master/.env.example) to `.env`:
|
||||
# ```
|
||||
# curl -o .env https://gitlab.com/bramw/baserow/-/blob/master/.env.example
|
||||
# ```
|
||||
# 2. Edit `.env` and provide values for the missing environment variables.
|
||||
# 3. `docker-compose up`
|
||||
#
|
||||
# Alternatively you can set these variables by either running docker-compose with
|
||||
# Alternatively you can set these variables by either running docker-compose with
|
||||
# the environment variables set on the command line (fill in secure values first):
|
||||
# ```
|
||||
# SECRET_KEY= DATABASE_PASSWORD= REDIS_PASSWORD= docker-compose up
|
||||
# ```
|
||||
#
|
||||
# SECRET_KEY= DATABASE_PASSWORD= REDIS_PASSWORD= docker-compose up
|
||||
# ## Upgrading from Baserow 1.8.2's docker-compose file
|
||||
#
|
||||
# == Upgrading from Baserow 1.8.2's docker-compose file
|
||||
#
|
||||
# To upgrade from 1.8.2's docker-compose file you need to:
|
||||
# 1. Copy '.env.example' to '.env' and edit '.env' filling in the missing variables
|
||||
# below:
|
||||
# - SECRET_KEY to a secure value, existing logins sessions will be invalidated.
|
||||
# - DATABASE_PASSWORD to a secure password (this defaulted to 'baserow' before, in
|
||||
# step 3 we are going to change the database users password to the value you set)
|
||||
# - REDIS_PASSWORD to a secure password
|
||||
# - WEB_FRONTEND_PORT back to 3000 if you want to continue accessing Baserow on
|
||||
# that port (it now defaults to 80).
|
||||
# - BASEROW_PUBLIC_URLS to the URL/IP/Domain you were using access Baserow remotely (it must
|
||||
# begin with http:// or https://). If you have set WEB_FRONTEND_PORT to anything
|
||||
# but 80 you must append it to the end of BASEROW_PUBLIC_URLS.
|
||||
# 2. Stop your existing Baserow install when safe to do so:
|
||||
# docker-compose down --remove-orphans
|
||||
# 3. Run the command below which will change the baserow postgresql users password to
|
||||
# what you have set in step 1 in the .env file (no need to edit the command):
|
||||
# docker-compose run --rm backend bash -c "PGPASSWORD=baserow psql -h db -U baserow -c \"ALTER USER baserow WITH PASSWORD '$DATABASE_PASSWORD';\" && echo 'Successfully changed Baserow's db user password'"
|
||||
# 4. docker-compose up -d
|
||||
# To upgrade from 1.8.2's docker-compose file from inside the Baserow git repo you need to:
|
||||
# 1. Stop your existing Baserow install when safe to do so:
|
||||
# `docker-compose down`
|
||||
# 2. `git pull`
|
||||
# 3. Copy `.env.example` to `.env` and edit `.env` filling in the missing variables
|
||||
# below:
|
||||
# - `SECRET_KEY` to a secure value, existing logins sessions will be invalidated.
|
||||
# - `DATABASE_PASSWORD` to a secure password (this defaulted to 'baserow' before, in
|
||||
# step 3 we are going to change the database users password to the value you set)
|
||||
# - `REDIS_PASSWORD` to a secure password.
|
||||
# - `WEB_FRONTEND_PORT` back to 3000 if you want to continue accessing Baserow on
|
||||
# that port (it now defaults to 80).
|
||||
# - `BASEROW_PUBLIC_URL` to the URL/IP/Domain you were using access Baserow remotely
|
||||
# (it must begin with http:// or https://). If you have set `WEB_FRONTEND_PORT` to
|
||||
# anything but 80 you must append it to the end of `BASEROW_PUBLIC_URL`.
|
||||
# - `BASEROW_CADDY_ADDRESSES` configures which addresses the new internal Caddy reverse
|
||||
# proxy listens on. By default, it will serve http only, enable automatic https
|
||||
# by setting to `https://YOUR_DOMAIN_NAME.com`. Append `,http://localhost` if you
|
||||
# still want to be able to access Baserow from `localhost`.
|
||||
# 4. Run the command below which will change the baserow postgresql users password to
|
||||
# what you have set in step 1 in the .env file (no need to edit the command):
|
||||
# ```
|
||||
# docker-compose run --rm backend bash -c "PGPASSWORD=baserow psql -h db -U baserow -c \"ALTER USER baserow WITH PASSWORD '$DATABASE_PASSWORD';\" && echo 'Successfully changed Baserow's db user password'"
|
||||
# ```
|
||||
# 5. `docker-compose up -d`
|
||||
|
||||
# These environment variables are required to be set securely by you, see the README
|
||||
# above.
|
||||
@@ -65,7 +80,7 @@ x-backend-required-variables: &backend-required-variables
|
||||
|
||||
# These are optional but important variables which control how Baserow can be accessed.
|
||||
x-common-important-variables: &common-important-variables
|
||||
# BASEROW_PUBLIC_URLS is a comma separated list of urls you will be using to access
|
||||
# BASEROW_PUBLIC_URL is a comma separated list of urls you will be using to access
|
||||
# Baserow, normally should just be a single URL. The first URL provided will be used
|
||||
# to generate correct urls in emails, share links, downloads. All the urls will be
|
||||
# used by the Caddy reverse proxy as addresses to listen for. See
|
||||
@@ -73,13 +88,17 @@ x-common-important-variables: &common-important-variables
|
||||
# Caddy will setup HTTPS automatically if you have setup DNS correctly and use a
|
||||
# https:// url. See https://caddyserver.com/docs/automatic-https.
|
||||
# > If you are also setting WEB_FRONTEND_PORT to anything but 80 then you must
|
||||
# > append this port to your BASEROW_PUBLIC_URLS like so:
|
||||
# > append this port to your BASEROW_PUBLIC_URL like so:
|
||||
# > $YOUR_BASEROW_PUBLIC_URL:$YOUR_CUSTOM_WEB_FRONTEND_PORT
|
||||
BASEROW_PUBLIC_URLS: ${BASEROW_PUBLIC_URLS:-http://localhost, :80}
|
||||
BASEROW_PUBLIC_URL: ${BASEROW_PUBLIC_URL:-http://localhost}
|
||||
# This is a comma separated list of addresses the Caddy reverse proxy sitting in-front
|
||||
# of Baserow's services will listen on. If you wish to enable automatic https then
|
||||
# you should change this to be `https://YOUR_DOMAIN_NAME.com`.
|
||||
BASEROW_CADDY_ADDRESSES: ${BASEROW_CADDY_ADDRESSES:-:80}
|
||||
# WEB_FRONTEND_PORT is the HTTP port that Baserow will bind to on the host to serve
|
||||
# content. Prior to 1.9 this defaulted to 3000 but was changed to 80 in 1.9.
|
||||
# > If set to anything but the default of 80 to access Baserow you will need to
|
||||
# > append the port to your BASEROW_PUBLIC_URLS (see above).
|
||||
# > append the port to your BASEROW_PUBLIC_URL (see above).
|
||||
WEB_FRONTEND_PORT: ${WEB_FRONTEND_PORT:-80}
|
||||
# WEB_FRONTEND_SSL_PORT is the SSL port Baserow will bind to on the host for HTTPS.
|
||||
WEB_FRONTEND_SSL_PORT: ${WEB_FRONTEND_SSL_PORT:-443}
|
||||
@@ -92,13 +111,6 @@ x-common-important-variables: &common-important-variables
|
||||
# running docker-compose. Useful for when you want to run Baserow behind
|
||||
# a reverse proxy or just make it private.
|
||||
HOST_PUBLISH_IP: ${HOST_PUBLISH_IP:-0.0.0.0}
|
||||
# If running Baserow behind a reverse proxy which already handles HTTPS you should
|
||||
# disable the automatic HTTPS provided by Baserow's Caddy by setting
|
||||
# BASEROW_CADDY_GLOBAL_CONF to 'auto_https off', see
|
||||
# https://caddyserver.com/docs/automatic-https for more details and the Caddyfile in
|
||||
# the root of this repository. You will probably also need to append ",:80" to
|
||||
# BASEROW_PUBLIC_URLS so the Caddy server will listen for http requests.
|
||||
BASEROW_CADDY_GLOBAL_CONF: ${BASEROW_CADDY_GLOBAL_CONF:-}
|
||||
# Set to any non-empty value to ensure Baserow generates https:// next links provided
|
||||
# by paginated API endpoints. Baserow will still work correctly if not enabled, this
|
||||
# is purely for giving the correct https url for clients of the API.
|
||||
@@ -146,8 +158,9 @@ services:
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
<<: *common-variables
|
||||
BASEROW_CADDY_GLOBAL_CONF: ${BASEROW_CADDY_GLOBAL_CONF:-}
|
||||
ports:
|
||||
- "${HOST_PUBLISH_IP:-0.0.0.0}:${WEB_FRONTEND_PORT:-80}:${WEB_FRONTEND_PORT:-80}"
|
||||
- "${HOST_PUBLISH_IP:-0.0.0.0}:${WEB_FRONTEND_PORT:-80}:80"
|
||||
- "${HOST_PUBLISH_IP:-0.0.0.0}:${WEB_FRONTEND_SSL_PORT:-443}:443"
|
||||
volumes:
|
||||
- $PWD/Caddyfile:/etc/caddy/Caddyfile
|
||||
@@ -163,7 +176,7 @@ services:
|
||||
local:
|
||||
|
||||
backend:
|
||||
image: baserow/backend:1.8.2
|
||||
image: baserow/backend:1.8.3
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
<<: *common-backend-variables
|
||||
@@ -176,7 +189,7 @@ services:
|
||||
local:
|
||||
|
||||
web-frontend:
|
||||
image: baserow/web-frontend:1.8.2
|
||||
image: baserow/web-frontend:1.8.3
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
<<: *common-variables
|
||||
@@ -186,7 +199,7 @@ services:
|
||||
local:
|
||||
|
||||
celery:
|
||||
image: baserow/backend:1.8.2
|
||||
image: baserow/backend:1.8.3
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
<<: *common-backend-variables
|
||||
@@ -203,7 +216,7 @@ services:
|
||||
local:
|
||||
|
||||
celery-export-worker:
|
||||
image: baserow/backend:1.8.2
|
||||
image: baserow/backend:1.8.3
|
||||
restart: unless-stopped
|
||||
command: celery-exportworker
|
||||
# The backend image's baked in healthcheck defaults to the django healthcheck
|
||||
@@ -220,7 +233,7 @@ services:
|
||||
local:
|
||||
|
||||
celery-beat-worker:
|
||||
image: baserow/backend:1.8.2
|
||||
image: baserow/backend:1.8.3
|
||||
restart: unless-stopped
|
||||
command: celery-beat
|
||||
# We don't yet have a healthcheck for the beat worker, just assume it is healthy.
|
||||
|
||||
@@ -1,220 +0,0 @@
|
||||
# Baserow Docker how to
|
||||
|
||||
Find below a list of FAQs and common operations when working with Baserow's docker
|
||||
environment.
|
||||
|
||||
> Docker version 19.03 is the minimum required to build Baserow. It is strongly
|
||||
> advised however that you install the latest version of Docker available: 20.10.
|
||||
> Please check that your docker is up to date by running `docker -v`.
|
||||
|
||||
See [baserow's docker api](../technical/baserow-docker-api.md) for the full details on
|
||||
what commands and environment variables baserow's docker-compose and docker image's
|
||||
support.
|
||||
|
||||
## How To
|
||||
|
||||
### View the logs
|
||||
|
||||
```bash
|
||||
$ docker-compose logs
|
||||
```
|
||||
|
||||
### Run Baserow alongside existing services
|
||||
|
||||
Baserow's docker-compose files will automatically expose the `backend`, `web-frontend`
|
||||
and `media` containers to your machine's network. If you already have applications or
|
||||
services using those ports the Baserow service which uses that port will crash.
|
||||
|
||||
To fix this you can change which ports Baserow will use by setting the corresponding
|
||||
environment variables:
|
||||
|
||||
- For `backend` change both:
|
||||
- `BACKEND_PORT`, defaults to `8000`
|
||||
- `PUBLIC_BACKEND_URL` with the new port, defaults to `http://localhost:8000`
|
||||
- For `web-frontend` change both:
|
||||
- `WEB_FRONTEND_PORT`, defaults to `3000`
|
||||
- `PUBLIC_WEB_FRONTEND_URL` with the new port, defaults to `http://localhost:3000`
|
||||
- For `media` change both:
|
||||
- `MEDIA_PORT`, defaults to `4000`
|
||||
- `MEDIA_URL`, defaults to `http://localhost:4000/media/`
|
||||
|
||||
This is how to set these variables in bash:
|
||||
|
||||
```bash
|
||||
$ BACKEND_PORT=8001 PUBLIC_BACKEND_URL=http://localhost:8001 docker-compose up
|
||||
$ # or using dev.sh
|
||||
$ BACKEND_PORT=8001 PUBLIC_BACKEND_URL=http://localhost:8001 ./dev.sh
|
||||
```
|
||||
|
||||
### Make Baserow publicly accessible
|
||||
|
||||
Please note, the Docker and compose files provided by Baserow are currently only
|
||||
intended for local use. Exposing these containers publicly on the internet is not
|
||||
currently supported and is done at your own risk.
|
||||
|
||||
By default when you run `docker-compose up` you can only access Baserow from the same
|
||||
machine by visiting `localhost:3000` or `127.0.0.1:3000`. If you are running the Baserow
|
||||
docker containers on a remote server which you want to access over a network or the
|
||||
public internet you need to set some environment variables to expose Baserow.
|
||||
|
||||
> Please be warned that there is a security flaw with docker and the ufw firewall.
|
||||
> By default docker when exposing ports on 0.0.0.0 will bypass any ufw firewall rules
|
||||
> and expose the above containers publicly from your machine on the network. Please see
|
||||
> https://github.com/chaifeng/ufw-docker for more information and how to setup ufw to
|
||||
> work securely with docker.
|
||||
|
||||
You will need to set the following three environment variables to successfully expose
|
||||
Baserow on your network.
|
||||
|
||||
1. `HOST_PUBLISH_IP=0.0.0.0` - This will configure `docker-compose.yml` to expose
|
||||
Baserow's containers on all IP addresses on the host machine, instead of just
|
||||
localhost. Warning: if you are using UFW please see the warning above.
|
||||
2. `PUBLIC_BACKEND_URL={REPLACE_WITH_YOUR_BASEROW_PUBLIC_URLS_NAME_OR_HOST_IP}:8000` - This will
|
||||
ensure that Baserow clients will be able to successfully connect to the backend,
|
||||
if you can visit Baserow at port `3000` but you are getting API errors please ensure
|
||||
this variable is set correctly. If an IP address this must start with `http://` or
|
||||
`https://`.
|
||||
3. `PUBLIC_WEB_FRONTEND_URL={REPLACE_WITH_YOUR_BASEROW_PUBLIC_URLS_NAME_OR_HOST_IP}:3000` - The same
|
||||
variable as above but the URL for the web-frontend container instead.
|
||||
|
||||
Then you will need to go to `src/baserow/config/settings/base.py:16` and modify the
|
||||
`ALLOWED_HOSTS` variable to include the hostname or IP address of the server that
|
||||
Baserow will be running on (the hostname/ip you will be typing into the
|
||||
browser to access the site). For example adding a local network's IP would look like:
|
||||
```python
|
||||
ALLOWED_HOSTS = ["localhost", "192.168.0.194"]
|
||||
```
|
||||
|
||||
One way of setting the 3 environment variables is below. Please replease `REPLACE_ME`
|
||||
with the IP address or domain name of the server where Baserow is running. Ensure that
|
||||
you prepend IP addresses with `http://` as shown in the second command below.
|
||||
|
||||
```bash
|
||||
$ HOST_PUBLISH_IP=0.0.0.0 PUBLIC_BACKEND_URL=REPLACE_ME:8000 PUBLIC_WEB_FRONTEND_URL=REPLACE_ME:3000 docker-compose up --build
|
||||
# For example running Baserow on a local network would look something like:
|
||||
$ HOST_PUBLISH_IP=0.0.0.0 PUBLIC_BACKEND_URL=http://192.168.0.194:8000 PUBLIC_WEB_FRONTEND_URL=http://192.168.0.194:3000 docker-compose up --build
|
||||
```
|
||||
|
||||
### Configure an external email server
|
||||
|
||||
See [the introduction](../technical/introduction.md) 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:
|
||||
|
||||
```bash
|
||||
EMAIL_SMTP_HOST=TODO EMAIL_SMTP_PORT=TODO EMAIL_SMTP=True docker-compose up
|
||||
```
|
||||
|
||||
### Change the container user
|
||||
|
||||
When running the dev env you can set the `UID` and `GID` environment variables when
|
||||
building and running Baserow to change the user id and group id for the following
|
||||
containers:
|
||||
|
||||
- backend
|
||||
- celery
|
||||
- web-frontend
|
||||
|
||||
> Remember you need to re-build if you change these variables or run `./dev.sh` from a
|
||||
> new user.
|
||||
> This is because Baserow's images build with file permissions set to the
|
||||
> given `UID` and `GID`, so if they change without a re-build they will be incorrect.
|
||||
|
||||
When using `./dev.sh` it will automatically set `UID` and `GID` to the ids of the user
|
||||
running the command for you.
|
||||
|
||||
### Disable automatic migration
|
||||
|
||||
You can disable automatic migration by setting the `MIGRATE_ON_STARTUP` environment
|
||||
variable to `false` (or any value which is not `true`) like so:
|
||||
|
||||
```bash
|
||||
$ 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 migration
|
||||
|
||||
```bash
|
||||
# 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
|
||||
```
|
||||
|
||||
### Disable automatic template syncing
|
||||
|
||||
You can disable automatic baserow template syncing by setting the
|
||||
`SYNC_TEMPLATES_ON_STARTUP` environment variable to `false` (or any value which is
|
||||
not `true`) like so:
|
||||
|
||||
```bash
|
||||
$ 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 management command
|
||||
|
||||
```bash
|
||||
# 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
|
||||
```
|
||||
|
||||
### Back-up your Baserow DB
|
||||
|
||||
Please read the output of `docker-compose run backend manage backup_baserow --help` and
|
||||
the runbook found here [runbooks/back-up-and-restore-baserow.md](https://gitlab.com/bramw/baserow/-/blob/develop/docs/runbooks/back-up-and-restore-baserow.md.md)
|
||||
before backing up your Baserow database.
|
||||
|
||||
```bash
|
||||
$ docker-compose build # Make sure you have built the latest images first
|
||||
$ mkdir ~/baserow_backups
|
||||
# The folder must be the same UID:GID as the user running inside the container, which
|
||||
# for the local env is 9999:9999, for the dev env it is 1000:1000 or your own UID:GID
|
||||
# when using ./dev.sh
|
||||
$ sudo chown 9999:9999 ~/baserow_backups/
|
||||
$ docker-compose run -e PGPASSWORD=baserow -v ~/baserow_backups:/baserow/backups backend manage backup_baserow -h db -d baserow -U baserow -f /baserow/backups/baserow_backup.tar.gz
|
||||
# backups/ now contains your Baserow backup.
|
||||
```
|
||||
|
||||
### Restore your Baserow DB from a back-up
|
||||
|
||||
Please read the output of `docker-compose run backend manage restore_baserow --help` and
|
||||
the runbook found here [runbooks/back-up-and-restore-baserow.md](https://gitlab.com/bramw/baserow/-/blob/develop/docs/runbooks/back-up-and-restore-baserow.md.md)
|
||||
before restoring a Baserow database.
|
||||
|
||||
```bash
|
||||
$ docker-compose build # Make sure you have built the latest images first
|
||||
$ docker-compose run -e PGPASSWORD=baserow -v ~/baserow_backups/:/baserow/backups/ backend manage restore_baserow -h db -d baserow -U baserow -f /baserow/backups/baserow_backup.tar.gz
|
||||
```
|
||||
|
||||
## Common Problems
|
||||
|
||||
### Build Error - Service 'backend' failed to build: unable to convert uid/gid chown
|
||||
|
||||
This error occurs when attempting to build Baserow's docker images with a version of
|
||||
Docker earlier than 19.03. It can also occur when you are attempting to build Baserow
|
||||
version 1.3 or earlier using a version of Docker less than 20.10. You can check your
|
||||
local docker version by running `docker -v` and fix the error by installing the latest
|
||||
version of Docker from https://docs.docker.com/get-docker/.
|
||||
|
||||
### Permission denied errors
|
||||
|
||||
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:
|
||||
|
||||
```bash
|
||||
chown YOUR_USERNAME_HERE -R baserow/
|
||||
```
|
||||
@@ -1,167 +0,0 @@
|
||||
# Baserow's Docker Setup
|
||||
|
||||
Baserow provides various Dockerfiles and an example docker-compose file to install
|
||||
Baserow. How these Dockerfiles are structured and setup is explained below:
|
||||
|
||||
## Baserow's Docker Files
|
||||
|
||||
Below are the files used by our docker setup and what they are responsible for:
|
||||
|
||||
### The Local Env
|
||||
|
||||
- `docker-compose.yml`: A compose file which starts Baserow in local mode with no
|
||||
development features enabled.
|
||||
- `./deploy/all-in-on/Dockerfile`: An Dockerfile which runs Baserow in a single
|
||||
container by internally using [supervisord](http://supervisord.org/) to run the
|
||||
various services.
|
||||
- `./backend/Dockerfile`: The backend's Dockerfile. See below for
|
||||
supported command line arguments. Also used to run the celery worker.
|
||||
- `./web-frontend/Dockerfile`: The web-frontend's Dockerfile. See below
|
||||
for supported command line arguments.
|
||||
|
||||
### The Dev Env
|
||||
|
||||
- `docker-compose.dev.yml`: A compose file which overrides parts of `docker-compose.yml`
|
||||
to enable development features, do not use this in production.
|
||||
- `./backend/docker/Dockerfile`: Build with `--target dev` to get the dev version.
|
||||
- `./web-frontend/docker/Dockerfile`: Build with `--target dev` to get the dev version.
|
||||
|
||||
### For Both Envs
|
||||
|
||||
- `./backend/docker/docker-entrypoint.sh`: The entrypoint script used by the backend
|
||||
Dockerfile, provides a set of commonly used commands for working with baserow.
|
||||
- `./web-frontend/docker/docker-entrypoint.sh`: The entrypoint script used by the
|
||||
web-frontend Dockerfile, provides a set of commonly used commands for working
|
||||
with Baserow.
|
||||
|
||||
## Backend Image CLI
|
||||
|
||||
The `baserow_backend` and `baserow_backend_dev` images provide various commands used to
|
||||
change what process is started inside the container.
|
||||
|
||||
```txt
|
||||
Usage: docker run [-T] baserow_backend[_dev] COMMAND
|
||||
Commands
|
||||
local : Start django using a prod ready gunicorn server
|
||||
dev : Start a normal Django development server
|
||||
exec : Exec a command directly.
|
||||
bash : Start a bash shell
|
||||
manage : Start manage.py
|
||||
setup : Runs all setup commands (migrate, update_formulas, sync_templates)
|
||||
python : Run a python command
|
||||
shell : Start a Django Python shell
|
||||
celery : Run celery
|
||||
celery-dev: : Run a hot-reloading dev version of celery
|
||||
lint: : Run the linting (only available if using dev target)
|
||||
lint-exit : Run the linting and exit (only available if using dev target)
|
||||
test: : Run the tests (only available if using dev target)
|
||||
ci-test: : Run the tests for ci including various reports (dev only)
|
||||
ci-check-startup: Start up a single gunicorn and timeout after 10 seconds for ci (dev).
|
||||
help : Show this message
|
||||
```
|
||||
|
||||
You can run one of these as a one off command like so:
|
||||
|
||||
```bash
|
||||
# In the local environment
|
||||
$ docker-compose run backend COMMAND
|
||||
# In the dev environment
|
||||
$ ./dev.sh run backend COMMAND
|
||||
```
|
||||
|
||||
## Web Frontend CLI
|
||||
|
||||
The `baserow_web-frontend` and `baserow_web-frontend_dev` images provide various
|
||||
commands used to change what process is started inside the container.
|
||||
|
||||
```txt
|
||||
Usage: docker run [-T] baserow_web-frontend[_dev] COMMAND
|
||||
Commands
|
||||
dev : Start a normal nuxt development server
|
||||
local : Start a non-dev prod ready nuxt server
|
||||
lint : Run all the linting
|
||||
lint-fix : Run eslint fix
|
||||
stylelint: Run stylelint
|
||||
eslint : Run eslint
|
||||
test : Run jest tests
|
||||
ci-test : Run ci tests with reporting
|
||||
exec : Exec a command directly.
|
||||
bash : Start a bash shell
|
||||
help : Show this message
|
||||
```
|
||||
|
||||
You can run one of these as a one off command like so:
|
||||
|
||||
```bash
|
||||
# In the local environment
|
||||
$ docker-compose run web-frontend COMMAND
|
||||
# In the dev environment
|
||||
$ ./dev.sh run web-frontend COMMAND
|
||||
```
|
||||
|
||||
## Environment Variables
|
||||
|
||||
See [the introduction](../technical/introduction.md) for the environment variables
|
||||
supported specifically by the backend and web-frontend processes. Below are the
|
||||
variables available for configuring baserow's docker setup.
|
||||
|
||||
All of these variables can be set like so:
|
||||
|
||||
```bash
|
||||
$ BACKEND_PORT=8001 docker-compose up
|
||||
$ # or using dev.sh
|
||||
$ BACKEND_PORT=8001 MIGRATE_ON_STARTUP=false ./dev.sh
|
||||
```
|
||||
|
||||
### Local and Dev Variables
|
||||
|
||||
Port configuration (these only work when used with the docker-compose files):
|
||||
|
||||
- `HOST_PUBLISH_IP` (default `127.0.0.1`) : The IP address on the docker host Baserow's
|
||||
containers will bind exposed ports to. By default Baserow only exposes it's containers
|
||||
ports on localhost, please see
|
||||
the [Baserow Docker How To](baserow-docker-how-to.md)
|
||||
on how to expose Baserow over a network or the internet.
|
||||
- `BACKEND_PORT` (default `8000`) : The port the `backend` container will bind to on
|
||||
your local network.
|
||||
- `WEB_FRONTEND_PORT` (default `3000`) : The port the `web-frontend`
|
||||
container will bind to on your local network.
|
||||
- `MEDIA_PORT` (default `4000`) : The port the `media` nginx container will bind to on
|
||||
your local network.
|
||||
|
||||
Backend configuration:
|
||||
|
||||
- `MIGRATE_ON_STARTUP` (default `true`) : When `true` on backend server startup it will
|
||||
perform a django migration before launching the backend server.
|
||||
- `SYNC_TEMPLATES_ON_STARTUP` (default `true`) : When `true` on backend server startup
|
||||
it will run the baserow management command `sync_templates` which loads any templates
|
||||
found in `./backend/templates` into Baserow.
|
||||
|
||||
Pass through variables:
|
||||
|
||||
These environment variables when provided to the docker-compose files are passed through
|
||||
to the correct containers. See [the introduction](../technical/introduction.md)
|
||||
for what these variables do.
|
||||
|
||||
- `PUBLIC_BACKEND_URL`
|
||||
- `PUBLIC_WEB_FRONTEND_URL`
|
||||
- `MEDIA_URL`
|
||||
- `EMAIL_SMTP`
|
||||
- `EMAIL_SMTP_HOST`
|
||||
- `EMAIL_SMTP_PORT`
|
||||
- `EMAIL_SMTP_USE_TLS`
|
||||
- `EMAIL_SMTP_USER`
|
||||
- `EMAIL_SMTP_PASSWORD`
|
||||
- `FROM_EMAIL`
|
||||
- `DISABLE_ANONYMOUS_PUBLIC_VIEW_WS_CONNECTIONS`
|
||||
|
||||
### Dev Only Variables
|
||||
|
||||
- `UID` (default `1000` or your user id when using `./dev.sh`) : Sets which user id will
|
||||
be used to build Baserow's images with and the user id which will be used to run the
|
||||
processes inside Baserow containers.
|
||||
- `GID` (default `1000` or your group id when using `./dev.sh`) : Sets which group id
|
||||
will be used to build Baserow's images with and the group id which will be used to run
|
||||
the processes inside Baserow containers.
|
||||
- `POSTGRES_PORT` (default `5432`) : The port the `db` container will bind to on your
|
||||
local network.
|
||||
@@ -1,101 +0,0 @@
|
||||
# Running Baserow locally
|
||||
|
||||
If you just want to try out Baserow on your local computer, it is best to use
|
||||
`docker-compose`. The provided `docker-compose.yml` file will run a local version of
|
||||
Baserow only accessible on the machine it is running on.
|
||||
|
||||
Please note, the Docker and compose files provided by Baserow are currently only
|
||||
intended for local use. Exposing these containers publicly on the internet is not
|
||||
currently supported and is done at your own risk.
|
||||
|
||||
### Quickstart
|
||||
|
||||
If you are familiar with git and docker-compose run these commands to launch baserow
|
||||
locally, otherwise please start from the Installing Requirements section below.
|
||||
|
||||
```bash
|
||||
$ git clone --branch master https://gitlab.com/bramw/baserow.git
|
||||
$ cd baserow
|
||||
$ docker-compose up
|
||||
```
|
||||
|
||||
## Installing requirements
|
||||
|
||||
If you haven't already installed docker and docker-compose on your computer you can do
|
||||
so by following the instructions on https://docs.docker.com/desktop/ and
|
||||
https://docs.docker.com/compose/install/.
|
||||
|
||||
> Docker version 19.03 is the minimum required to build Baserow. It is strongly
|
||||
> advised however that you install the latest version of Docker available: 20.10.
|
||||
> Please check that your docker is up to date by running `docker -v`.
|
||||
|
||||
You will also need git installed which you can do by following the instructions on
|
||||
https://www.linode.com/docs/development/version-control/how-to-install-git-on-linux-mac-and-windows/
|
||||
.
|
||||
|
||||
After installing all the required software you should be able to run the following
|
||||
commands in your terminal.
|
||||
|
||||
```
|
||||
$ docker -v
|
||||
Docker version 20.10.6, build 370c289
|
||||
$ docker-compose -v
|
||||
docker-compose version 1.26.2, build eefe0d31
|
||||
$ git --version
|
||||
git version 2.24.3 (Apple Git-128)
|
||||
```
|
||||
|
||||
If all commands return something similar as described in the example, then you are ready
|
||||
to proceed!
|
||||
|
||||
## Starting baserow using docker-compose
|
||||
|
||||
> Note that this has only been tested on MacOS Catalina and Ubuntu 20.04. If you run
|
||||
> into any issues with other operating systems, feel free to contact us via the form on
|
||||
> https://baserow.io/contact.
|
||||
|
||||
For example purposes I have created a directory in my home folder named `baserow`. You
|
||||
can of course follow the steps in any directory, but in this tutorial I will assume the
|
||||
working directory is `~/baserow`.
|
||||
|
||||
First we have to clone the repository. Execute the following commands to clone the
|
||||
master branch. If you are not familiar with git clone, this will download a copy
|
||||
Baserow's code to your computer.
|
||||
|
||||
```
|
||||
$ cd ~/baserow
|
||||
$ git clone --branch master https://gitlab.com/bramw/baserow.git
|
||||
Cloning into 'baserow'...
|
||||
...
|
||||
$ cd baserow
|
||||
```
|
||||
|
||||
Now that we have our copy of the repo and have changed directories to the newly
|
||||
created `baserow`, we can bring up the containers. You just have to execute the
|
||||
`docker-compose up` command. It might take a while for the command to finish, this is
|
||||
because the image has to be built from scratch.
|
||||
|
||||
```
|
||||
$ docker-compose up
|
||||
Building backend
|
||||
...
|
||||
Starting db ... done
|
||||
Starting backend ... done
|
||||
Starting celery ... done
|
||||
Starting web-frontend ... done
|
||||
```
|
||||
|
||||
Once everything has finished, you can visit http://localhost:3000 in your browser and
|
||||
you should be redirected to the login screen. From here you can create a new account and
|
||||
start using the software.
|
||||
|
||||
> Baserow will not be accessible by default from machines other than the one it is
|
||||
> running on. Please see the [docker how to](baserow-docker-how-to.md)
|
||||
> on how to configure Baserow so you can access it over a network or the internet.
|
||||
|
||||
## Further Reading
|
||||
|
||||
- See [docker how to guide](baserow-docker-how-to.md) for a larger collection of useful
|
||||
operations and commands.
|
||||
- See [docker usage](../technical/baserow-docker-api.md) for more detail on how
|
||||
Baserow's docker setup can be used and configured.
|
||||
@@ -25,7 +25,7 @@ so by following the instructions on https://docs.docker.com/desktop/ and
|
||||
https://docs.docker.com/compose/install/.
|
||||
|
||||
> Docker version 19.03 is the minimum required to build Baserow. It is strongly
|
||||
> advised however that you install the latest version of Docker available: 20.10.
|
||||
> advised however that you install the latest version of Docker available.
|
||||
> Please check that your docker is up to date by running `docker -v`.
|
||||
|
||||
You will also need git installed which you can do by following the instructions on
|
||||
|
||||
+7
-4
@@ -16,8 +16,11 @@ Baserow by following one the guides below:
|
||||
|
||||
* [Install with Docker](installation/install-with-docker.md): A step-by-step guide to
|
||||
install Baserow using docker.
|
||||
* [Install with Docker Compose](installation/install-with-docker.md): A step-by-step
|
||||
guide to install Baserow using Docker Compose.
|
||||
* [Install with Docker Compose](installation/install-with-docker-compose.md): A
|
||||
step-by-step guide to install Baserow using Docker Compose.
|
||||
* [Install using Standalone images](installation/install-using-standalone-images.md): A
|
||||
general overview on how to run the Baserow standalone service images with your own
|
||||
container orchestration software.
|
||||
* [Install on Cloudron](installation/install-on-cloudron.md): Instructions to manually
|
||||
install Baserow on Cloudron.
|
||||
* [Install on Heroku](installation/install-on-heroku.md): A step-by-step guide to
|
||||
@@ -26,13 +29,13 @@ Baserow by following one the guides below:
|
||||
Docker and use it to install Baserow on a fresh ubuntu install.
|
||||
* [DEPRECATED: Install on Ubuntu](installation/old-install-on-ubuntu.md): A deprecated
|
||||
and now unsupported guide on how to manually install Baserow and its required services
|
||||
on a fresh ubuntu install. Please use the guides above instead.
|
||||
on a fresh Ubuntu install. Please use the guides above instead.
|
||||
|
||||
## Baserow Tutorials
|
||||
|
||||
* [Understanding Baserow Formulas](tutorials/understanding-baserow-formulas.md): A
|
||||
tutorial explaining how to use the formula field in Baserow.
|
||||
* [Debugging Connection Issues](tutorials/understanding-baserow-formulas.md): A
|
||||
* [Debugging Connection Issues](tutorials/debugging-connection-issues.md): A
|
||||
tutorial explaining how to use the formula field in Baserow.
|
||||
|
||||
## API Usage
|
||||
|
||||
+121
-106
@@ -1,111 +1,126 @@
|
||||
## Configuring Baserow
|
||||
# Configuring Baserow
|
||||
|
||||
Baserow can be configured by Environment Variables, custom plugins.
|
||||
> Any questions, problems or suggestions with this guide? Ask a question in our
|
||||
> [community](https://community.baserow.io/) or contribute the change yourself at
|
||||
> https://gitlab.com/bramw/baserow/-/tree/develop/docs .
|
||||
|
||||
### Environment Variables
|
||||
The table below shows all available environment variables supported by Baserow.
|
||||
Some environment variables have different defaults, are not supported, are optional etc
|
||||
depending on how you installed Baserow. See the specific installation guides for how
|
||||
to set these environment variables.
|
||||
|
||||
Below is a table of all the available environment variables you can set to customize
|
||||
Baserow. Please see the specific installation guides for how to set these environment
|
||||
variables.
|
||||
| Name | Description | Defaults | Standalone | All in one | Compose | Heroku | Cloudron |
|
||||
| ------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------- | -------------------------------------------------------------------- | ------------------------------------------------------------------------------ | ----------------------------------- | ---------------------------------------- | ------------------------------------------------------------------------------ |
|
||||
| | | | | | | | |
|
||||
| | | | | | | | |
|
||||
| DATABASE\_USER | The username of the database user Baserow will use to connect to the database at DATABASE\_HOST | | baserow | baserow | baserow | not used | $CLOUDRON\_POSTGRESQL\_USER |
|
||||
| DATABASE\_HOST | The hostname of the postgres database Baserow will use to store its data in. | | db | localhost | db | not used | $CLOUDRON\_POSTGRESQL\_HOST |
|
||||
| DATABASE\_PORT | The port Baserow will use when trying to connect to the postgres database at DATABASE\_HOST | | 5432 | 5432 | 5432 | not used | $CLOUDRON\_POSTGRESQL\_PORT |
|
||||
| DATABASE\_NAME | The database name Baserow will use to store data in. | | baserow | baserow | baserow | not used | $CLOUDRON\_POSTGRESQL\_DATABASE |
|
||||
| DATABASE\_PASSWORD | The password of DATABASE\_USER on the postgres server at DATABASE\_HOST | Prior to 1.9 in Compose files this defaulted to baserow | baserow | Automatically generated if not provided and stored in /baserow/data/.pgpass | REQUIRED | not used | $CLOUDRON\_POSTGRESQL\_PASSWORD |
|
||||
| | | | | | | | |
|
||||
| DATABASE\_URL | Alternatively to setting the individual DATABASE\_ parameters above instead you can provide one standard postgres connection string in the format of: postgresql://\[user\[:password\]@\]\[netloc\]\[:port\]\[/dbname\]\[?param1=value1&…\] | | | | | Set by Heroku | |
|
||||
| | | | | | | | |
|
||||
| POSTGRES\_STARTUP\_CHECK\_ATTEMPTS | When Baserows Backend service starts up it first checks to see if the postgres database is available. It checks 5 times by default, after which if it still has not connected it will crash. | 5 | | | | | |
|
||||
| | | | | | | | |
|
||||
| MIGRATE\_ON\_STARTUP | If set to “true” when the Baserow backend service starts up it will automaticly apply database migrations. Set to any other value to disable. If you disable this then you must remember to manually apply the database migrations when upgrading Baserow to a new version. | true | | | | | |
|
||||
| SYNC\_TEMPLATES\_ON\_STARTUP | If set to “true” when the Baserow backend service starts up it will automaticly sync all builtin Baserow templates. If you are using a postgres database which is constrained to fewer than 10000 rows then we recommend you disable this as the Baserow templates will go over that row limit. To disable this set to any other value than “true” | | true | true | true | false | true |
|
||||
| BASEROW\_ENABLE\_SECURE\_PROXY\_SSL\_HEADER | Set to any non-empty value to ensure Baserow generates https:// next links provided by paginated API endpoints. Baserow will still work correctly if not enabled, this is purely for giving the correct https url for clients of the API. If you have setup Baserow to use Caddy's auto HTTPS or you have put Baserow behind<br>a Baserow behind a reverse proxy which:<br>\* Handles HTTPS<br>\* Strips the X-Forwarded-Proto header from all incoming requests.<br>\* Sets the X-Forwarded-Proto header and sends it to Baserow.<br>Then you can safely set BASEROW\_ENABLE\_SECURE\_PROXY\_SSL\_HEADER=yes to ensure Baserow<br>generates https links for pagination correctly.<br> | | | | | | |
|
||||
| | | | | | | | |
|
||||
| BASEROW\_BACKEND\_BIND\_ADDRESS | \*INTERNAL\* The address that Baserow’s backend service will bind to. | | 0.0.0.0 | localhost | 0.0.0.0 | localhost | localhost |
|
||||
| BASEROW\_BACKEND\_PORT | \*INTERNAL\* Controls which port the Baserow backend service binds to. | 8000 | Defaults to 8000 |
|
||||
| BASEROW\_WEBFRONTEND\_BIND\_ADDRESS | \*INTERNAL\* The address that Baserow’s web-frontend service will bind to. | | | | | | |
|
||||
| | | | | | | | |
|
||||
| BASEROW\_BACKEND\_LOG\_LEVEL | The log level | INFO | | | | | |
|
||||
| BASEROW\_BACKEND\_DEBUG | If set to “on” then will enable the non production safe debug mode for the Baserow django backend. Defaults to “off” | | | | | | |
|
||||
| | | | | | | | |
|
||||
| | | | | | | | |
|
||||
| BASEROW\_AMOUNT\_OF\_WORKERS | The number of concurrent celery worker processes used to process asynchronous tasks. | | 1 | 1 | 1 | 1 | 1 |
|
||||
| BASEROW\_AMOUNT\_OF\_GUNICORN\_WORKERS | The number of concurrent worker processes used by the Baserow backend gunicorn server to process incoming requests | | 3 | 3 | 3 | $BASEROW\_AMOUNT\_OF\_WORKERS | 3 |
|
||||
| BASEROW\_RUN\_MINIMAL\_CELERY | If set to any non empty value will run the backend celery workers with various flags which reduce the amount of CPU and memory they use at the pontential expense of more worker related issues. | | | | | yes | |
|
||||
| BASEROW\_CELERY\_BEAT\_STARTUP\_DELAY | The number of seconds the celery beat worker sleeps before starting up. | 15 | | | | | |
|
||||
| | | | | | | | |
|
||||
| SECRET\_KEY | The Secret key used by Django for cryptographic signing such as generating secure password reset links and managing sessions. | | REQUIRED | Automatically generated if not provided and stored in /baserow/data/.secret | REQUIRED | Automatically provided by Heroku | Automatically generated if not provided and stored in /app/data/.secret |
|
||||
| | | | | | | | |
|
||||
| ADDITIONAL\_APPS | A comma separated list of additional django applications to add to the INSTALLED\_APPS django setting | | | | | | |
|
||||
| | | | | | | | |
|
||||
| REDIS\_HOST | The hostname of the redis database Baserow will use for caching and real time collaboration. | | redis | localhost | redis | not used | localhost |
|
||||
| REDIS\_PORT | The port Baserow will use when trying to connect to the redis database at REDIS\_HOST | | 6379 | 6379 | 6379 | not used | 6379 |
|
||||
| REDIS\_USER | The username of the redis user Baserow will use to connect to the redis at REDIS\_HOST | | | | | not used | |
|
||||
| REDIS\_PASSWORD | The password of REDIS\_USER on the redis server at REDIS\_HOST | | | Automatically generated if not provided and stored in /baserow/data/.redispass | | not used | Automatically generated if not provided and stored in /baserow/data/.redispass |
|
||||
| REDIS\_PROTOCOL | The redis protocol used when connecting to the redis at REDIS\_HOST Can either be \`redis\` or \`rediss\`. | redis | | | | not used | |
|
||||
| | | | | | | | |
|
||||
| REDIS\_URL | Alternatively to setting the individual REDIS\_ parameters above instead you can provide one standard redis connection string in the format of: redis://:\[password\]@\[redishost\]:\[redisport\] | | | | | Automatically provided by Heroku | |
|
||||
| | | | | | | | |
|
||||
| | | | | | | | |
|
||||
| | | | | | | | |
|
||||
| AWS\_ACCESS\_KEY\_ID | The access key for your AWS account. When set to anything other than empty will switch Baserow to use a S3 compatible bucket for storing user file uploads. | | | | | | |
|
||||
| AWS\_SECRET\_ACCESS\_KEY | The access secret key for your AWS account. | | | | | | |
|
||||
| AWS\_STORAGE\_BUCKET\_NAME | Your Amazon Web Services storage bucket name. | | | | | | |
|
||||
| AWS\_S3\_REGION\_NAME | \*Optional\*: Name of the AWS S3 region to use (eg. eu-west-1) | | | | | | |
|
||||
| AWS\_S3\_ENDPOINT\_URL | \*Optional\*: Custom S3 URL to use when connecting to S3, including<br>scheme. | | | | | | |
|
||||
| AWS\_S3\_CUSTOM\_DOMAIN | \*Optional\*: Your custom domain where the files can be downloaded<br>from. | | | | | | |
|
||||
| | | | | | | | |
|
||||
| | | | | | | | |
|
||||
| | | | | | | | |
|
||||
| BASEROW\_CADDY\_GLOBAL\_CONF | Will be substitued into the Caddyfiles global config section. Set to “auto\_https off” to disable Caddys auto https. | | N/A, Caddy is not present in the standalone images | | | | |
|
||||
| BASEROW\_CADDY\_EXTRA\_CONF | Will be substitued into the end of the Caddyfiles server block | | N/A, Caddy is not present in the standalone images | | | | |
|
||||
| BASEROW\_PUBLIC\_URL | The public URL or IP that will be used to access baserow. Always should start with http:// https:// even if accessing via an IP address. If a https:// url is provided and you are using an install method which uses a built in Caddy reverse proxy it will attempt to automatically setup HTTPS with lets encrypt for you. If you are accessing Baserow over a non-standard (80) http port then make sure you append :YOUR\_PORT to this variable.<br><br>Setting this will override PUBLIC\_BACKEND\_URL and PUBLIC\_WEB\_FRONTEND\_URL to the value of BASEROW\_PUBLIC\_URL. | | N/A, Use PUBLIC\_BACKEND\_URL and PUBLIC\_WEB\_FRONTEND\_URL instead | http://localhost | http://localhost | https://$HEROKU\_APP\_NAME.herokuapp.com | http://$CLOUDRON\_APP\_DOMAIN |
|
||||
| WEB\_FRONTEND\_PORT | The HTTP port that is being used to access Baserow using. Only used by the docker-compose files. | | N/A | N/A | 80 (prior to 1.9 defaulted to 3000) | N/A | N/A |
|
||||
| | | | | | | | |
|
||||
| PUBLIC\_BACKEND\_URL | Please use BASEROW\_PUBLIC\_URL unless you are using the standalone baserow/backend or baserow/web-frontend images. The publicly accessible URL of the backend. Should include the port if non-standard. | | http://localhost:8000 | $BASEROW\_PUBLIC\_URL | $BASEROW\_PUBLIC\_URL | $BASEROW\_PUBLIC\_URL | $BASEROW\_PUBLIC\_URL |
|
||||
| PUBLIC\_WEB\_FRONTEND\_URL | Please use BASEROW\_PUBLIC\_URL unless you are using the standalone baserow/backend or baserow/web-frontend images. The publicly accessible<br>URL of the web-frontend. Should include the port if non-standard. | | http://localhost:3000 | $BASEROW\_PUBLIC\_URL | $BASEROW\_PUBLIC\_URL | $BASEROW\_PUBLIC\_URL | $BASEROW\_PUBLIC\_URL |
|
||||
| | | | | | | | |
|
||||
| | | | | | | | |
|
||||
| | | | | | | | |
|
||||
| | | | | | | | |
|
||||
| PRIVATE\_BACKEND\_URL | Please do not change this unless you are using the standalone images. Not only the browser, but also<br>the web-frontend server should be able to make HTTP requests to the backend. It might<br>not have access to the \`PUBLIC\_BACKEND\_URL\` or there could be a more direct route,<br>(e.g. from container to container instead of via the internet). In case of the<br>development environment the backend container be accessed via the \`backend\` hostname<br>and because the server is also running on port 8000 inside the container, the private<br>backend URL should be \http://backend:8000\. | | http://backend:8000 | http://localhost:8000 | http://backend:8000 | http://localhost:8000 | http://localhost:8000 |
|
||||
| | | | | | | | |
|
||||
| INITIAL\_TABLE\_DATA\_LIMIT | The amount of rows that can be imported when creating a table. Defaults to empty which means unlimited rows. | | | | | | |
|
||||
| | | | | | | | |
|
||||
| MEDIA\_URL | INTERNAL The URL at which user uploaded media files will be made available | $PUBLIC\_BACKEND\_URL/media/ | | | | | |
|
||||
| MEDIA\_ROOT | INTERNAL The folder in which the backend will store user uploaded files | /baserow/media | $DATA\_DIR/media | /baserow /media | $DATA\_DIR/media | $DATA\_DIR/media | |
|
||||
| | | | | | | | |
|
||||
| | | | | | | | |
|
||||
| | | | | | | | |
|
||||
| FROM\_EMAIL | The email address Baserow will send emails from. | | no-reply@localhost | no-reply@localhost | no-reply@localhost | no-reply@$MAILGUN\_DOMAIN | $CLOUDRON\_MAIL\_FROM |
|
||||
| EMAIL\_SMTP | If set to any non empty value then Baserow will start sending emails using the configuration options below. If not set then Baserow will not send emails and just log them to the Celery worker logs instead. | | | | | 1 | true |
|
||||
| EMAIL\_SMTP\_USE\_TLS | If set to any non empty value then Baserow will attempt to send emails using TLS . | | | | | | |
|
||||
| EMAIL\_SMTP\_HOST | The host of the external SMTP server that Baserow should use to send emails. | | localhost | localhost | localhost | MAILGUN\_SMTP\_SERVER | $CLOUDRON\_MAIL\_SMTP\_SERVER |
|
||||
| EMAIL\_SMTP\_PORT | The port used to connect to $EMAIL\_SMTP\_HOST on. | | 25 | 25 | 25 | MAILGUN\_SMTP\_PORT | $CLOUDRON\_MAIL\_SMTP\_PORT |
|
||||
| EMAIL\_SMTP\_USER | The username to authenticate with $EMAIL\_SMTP\_HOST when sending emails. | | | | | MAILGUN\_SMTP\_LOGIN | $CLOUDRON\_MAIL\_SMTP\_USERNAME |
|
||||
| EMAIL\_SMTP\_PASSWORD | The password to authenticate with $EMAIL\_SMTP\_HOST when sending emails. | | | | | MAILGUN\_SMTP\_PASSWORD | $CLOUDRON\_MAIL\_SMTP\_PASSWORD |
|
||||
| | | | | | | | |
|
||||
| HOURS\_UNTIL\_TRASH\_PERMANENTLY\_DELETED | Items from the trash will be permanently deleted after this number of hours. | 72 | | | | | |
|
||||
| DISABLE\_ANONYMOUS\_PUBLIC\_VIEW\_WS\_CONNECTIONS | When sharing views publicly a websocket connection is opened to provide realtime updates to viewers of the public link. To disable this set any non empty value. When disabled publicly shared links will need to be refreshed to see any updates to the view. | | | | | | |
|
||||
| DONT\_UPDATE\_FORMULAS\_AFTER\_MIGRATION | Baserow’s formulas have an internal version number. When upgrading Baserow if the formula language has also changed then after the database migration has run Baserow will also automatically recalculate all formulas if they have a different version. Set this to any non empty value to disable this automatic update if you would prefer to run the update\_formulas management command manually yourself. Formulas might break if you forget to do so after an upgrade of Baserow until and so it is recommended to leave this empty. | | | | | | |
|
||||
| | | | | | | | |
|
||||
| BASEROW\_BACKEND\_LOG\_LEVEL | The default log level used by the backend, supports ERROR, WARNING, INFO, DEBUG, TRACE | INFO | | | | | |
|
||||
| BASEROW\_BACKEND\_DATABASE\_LOG\_LEVEL | The default log level used for database related logs in the backend. Supports the same values as the normal log level. If you also enable BASEROW\_BACKEND\_DEBUG and set this to DEBUG you will be able to see all SQL queries in the backend logs. | ERROR | | | | | |
|
||||
| | | | | | | | |
|
||||
| | | | | | | | |
|
||||
| DOWNLOAD\_FILE\_VIA\_XHR | Set to \`1\` to force download links to<br>download files via XHR query to bypass \`Content-Disposition: inline\` that<br>can't be overridden in another way. If your files are stored under another<br>origin, you also must add CORS headers to your server. | 0 | | | | | |
|
||||
| BASEROW\_DISABLE\_PUBLIC\_URL\_CHECK | When opening the Baserow login page a check is run to ensure the PUBLIC\_BACKEND\_URL/BASEROW\_PUBLIC\_URL variables are set correctly and your browser can correctly connect to the backend. If misconfigured an error is shown. If you wish to disable this check and warning set this to any non empty value. | 0 | | | | | |
|
||||
| | | | | | | | |
|
||||
| | | | | | | | |
|
||||
| | | | | | | | |
|
||||
| | | | | | | | |
|
||||
| | | | | | | | |
|
||||
| NO\_COLOR | Set this to any non empty value to disable colored logging in the all-in-one baserow image. | | | | | | |
|
||||
| | | | | | | | |
|
||||
| DJANGO\_SETTINGS\_MODULE | The settings python module to load when starting up the Backend django server. You shouldn’t need to set this yourself unless you are customizing the settings manually. | | baserow.config.settings.base | baserow.config.settings.base | baserow.config.settings.base | baserow.config.settings.heroku | baserow.config.settings.base |
|
||||
## Environment Variables
|
||||
|
||||
The installation methods referred to in the variable descriptions are:
|
||||
* [The Standalone service images](install-using-standalone-images.md)
|
||||
* [The baserow/baserow "all in one" image](install-with-docker.md)
|
||||
* [The Docker compose install](install-with-docker-compose.md)
|
||||
|
||||
> Variables marked with *Internal* should only be changed if you know what you are
|
||||
> doing.
|
||||
|
||||
### Access Configuration
|
||||
| Name | Description | Defaults |
|
||||
| ------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| BASEROW\_PUBLIC\_URL | The public URL or IP that will be used to access baserow. Always should start with http:// https:// even if accessing via an IP address. If you are accessing Baserow over a non-standard (80) http port then make sure you append :YOUR\_PORT to this variable.<br><br>Setting this will override PUBLIC\_BACKEND\_URL and PUBLIC\_WEB\_FRONTEND\_URL with BASEROW\_PUBLIC\_URL’s value. | http://localhost |
|
||||
| BASEROW\_CADDY\_ADDRESSES | **Not supported by standalone images.** A comma separated list of supported Caddy addresses( [https://caddyserver.com/docs/caddyfile/concepts#addresses](https://caddyserver.com/docs/caddyfile/concepts#addresses)). If a https:// url is provided the Caddy reverse proxy will attempt to [automatically setup HTTPS](https://caddyserver.com/docs/automatic-https) with lets encrypt for you. If you wish your Baserow to still be accessible on localhost and you set this value away from the default of :80 ensure you append “,[http://localhost](http://localhost/)” | :80 |
|
||||
| PUBLIC\_BACKEND\_URL | Please use BASEROW\_PUBLIC\_URL unless you are using the standalone baserow/backend or baserow/web-frontend images. The publicly accessible URL of the backend. Should include the port if non-standard. | $BASEROW\_PUBLIC\_URL, http://localhost:8000/ in the standalone images. |
|
||||
| PUBLIC\_WEB\_FRONTEND\_URL | Please use BASEROW\_PUBLIC\_URL unless you are using the standalone baserow/backend or baserow/web-frontend images. The publicly accessible URL of the web-frontend. Should include the port if non-standard. | $BASEROW\_PUBLIC\_URL, http://localhost:3000/ in the standalone images. |
|
||||
| WEB\_FRONTEND\_PORT | The HTTP port that is being used to access Baserow using. Only used by the docker-compose files. | Only used by the docker-compose.yml files, defaults to 80 but prior to 1.9 defaulted to 3000. |
|
||||
| PRIVATE\_BACKEND\_URL | **Only change this with standalone images.** This is the URL used when the web-frontend server directly queries the backend itself when doing server side rendering. As such not only the browser, but also<br>the web-frontend server should be able to make HTTP requests to the backend. The web-frontend nuxt server might not have access to the \`PUBLIC\_BACKEND\_URL\` or there could be a more direct route, (e.g. from container to container instead of via the internet). For example if the web-frontend and backend were containers on the same docker network this could be set to http://backend:8000. | |
|
||||
| BASEROW\_CADDY\_GLOBAL\_CONF | **Not supported by standalone images.** Will be substituted into the Caddyfiles global config section. Set to “debug” to enable Caddies debug logging. | |
|
||||
| BASEROW\_CADDY\_EXTRA\_CONF | **Not supported by standalone images.** Will be substituted into the end of the Caddyfiles server block | |
|
||||
|
||||
### Backend Configuration
|
||||
| Name | Description | Defaults |
|
||||
| ------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| SECRET\_KEY | The Secret key used by Django for cryptographic signing such as generating secure password reset links and managing sessions. See [https://docs.djangoproject.com/en/3.2/ref/settings/#std:setting-SECRET\_KEY](https://docs.djangoproject.com/en/3.2/ref/settings/#std:setting-SECRET_KEY) for more details | Required to be set by you in the docker-compose and standalone installs. Automatically generated by the baserow/baserow image if not provided and stored in /baserow/data/.secret. |
|
||||
| BASEROW\_BACKEND\_LOG\_LEVEL | The default log level used by the backend, supports ERROR, WARNING, INFO, DEBUG, TRACE | INFO |
|
||||
| BASEROW\_BACKEND\_DATABASE\_LOG\_LEVEL | The default log level used for database related logs in the backend. Supports the same values as the normal log level. If you also enable BASEROW\_BACKEND\_DEBUG and set this to DEBUG you will be able to see all SQL queries in the backend logs. | ERROR |
|
||||
| BASEROW\_BACKEND\_DEBUG | If set to “on” then will enable the non production safe debug mode for the Baserow django backend. Defaults to “off” | |
|
||||
| BASEROW\_AMOUNT\_OF\_GUNICORN\_WORKERS | The number of concurrent worker processes used by the Baserow backend gunicorn server to process incoming requests | |
|
||||
|
||||
### Backend Database Configuration
|
||||
| Name | Description | Defaults |
|
||||
| ------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| DATABASE\_HOST | The hostname of the postgres database Baserow will use to store its data in. | Defaults to db in the standalone and compose installs. If not provided in the \`baserow/baserow\` install then the embedded Postgres will be setup and used. |
|
||||
| DATABASE\_USER | The username of the database user Baserow will use to connect to the database at DATABASE\_HOST | baserow |
|
||||
| | | |
|
||||
| DATABASE\_PORT | The port Baserow will use when trying to connect to the postgres database at DATABASE\_HOST | 5432 |
|
||||
| DATABASE\_NAME | The database name Baserow will use to store data in. | baserow |
|
||||
| DATABASE\_PASSWORD | The password of DATABASE\_USER on the postgres server at DATABASE\_HOST | Required to be set by you in the docker-compose and standalone installs. Automatically generated by the baserow/baserow image if not provided and stored in /baserow/data/.pgpass. |
|
||||
| DATABASE\_URL | Alternatively to setting the individual DATABASE\_ parameters above instead you can provide one standard postgres connection string in the format of: postgresql://\[user\[:password\]@\]\[netloc\]\[:port\]\[/dbname\]\[?param1=value1&…\] | |
|
||||
| | | |
|
||||
| MIGRATE\_ON\_STARTUP | If set to “true” when the Baserow backend service starts up it will automatically apply database migrations. Set to any other value to disable. If you disable this then you must remember to manually apply the database migrations when upgrading Baserow to a new version. | true |
|
||||
| SYNC\_TEMPLATES\_ON\_STARTUP | If set to “true” when the Baserow backend service starts up it will automatically sync all builtin Baserow templates. If you are using a postgres database which is constrained to fewer than 10000 rows then we recommend you disable this as the Baserow templates will go over that row limit. To disable this set to any other value than “true” | true |
|
||||
| DONT\_UPDATE\_FORMULAS\_AFTER\_MIGRATION | Baserow’s formulas have an internal version number. When upgrading Baserow if the formula language has also changed then after the database migration has run Baserow will also automatically recalculate all formulas if they have a different version. Set this to any non empty value to disable this automatic update if you would prefer to run the update\_formulas management command manually yourself. Formulas might break if you forget to do so after an upgrade of Baserow until and so it is recommended to leave this empty. | |
|
||||
| POSTGRES\_STARTUP\_CHECK\_ATTEMPTS | When Baserow's Backend service starts up it first checks to see if the postgres database is available. It checks 5 times by default, after which if it still has not connected it will crash. | 5 |
|
||||
|
||||
### Redis Configuration
|
||||
| Name | Description | Defaults |
|
||||
| ------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| REDIS\_HOST | The hostname of the redis database Baserow will use for caching and real time collaboration. | Defaults to redis in the standalone and compose installs. If not provided in the \`baserow/baserow\` install then the embedded Redis will be setup and used. |
|
||||
| REDIS\_PORT | The port Baserow will use when trying to connect to the redis database at REDIS\_HOST | 6379 |
|
||||
| REDIS\_USER | The username of the redis user Baserow will use to connect to the redis at REDIS\_HOST | |
|
||||
| REDIS\_PASSWORD | The password of REDIS\_USER on the redis server at REDIS\_HOST | Required to be set by you in the docker-compose and standalone installs. Automatically generated by the baserow/baserow image if not provided and stored in /baserow/data/.redispass. |
|
||||
| REDIS\_PROTOCOL | The redis protocol used when connecting to the redis at REDIS\_HOST Can either be ‘redis’ or ‘rediss’. | redis |
|
||||
| | | |
|
||||
| REDIS\_URL | Alternatively to setting the individual REDIS\_ parameters above instead you can provide one standard redis connection string in the format of: redis://:\[password\]@\[redishost\]:\[redisport\] | |
|
||||
|
||||
### Celery Configuration
|
||||
| Name | Description | Defaults |
|
||||
| ------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| BASEROW\_CELERY\_BEAT\_STARTUP\_DELAY | The number of seconds the celery beat worker sleeps before starting up. | 15 |
|
||||
| BASEROW\_AMOUNT\_OF\_WORKERS | The number of concurrent celery worker processes used to process asynchronous tasks. | 1 |
|
||||
| BASEROW\_RUN\_MINIMAL | When BASEROW\_AMOUNT\_OF\_WORKERS is 1 and this is set to a non emtpy value Baserow will not run the export-worker but instead run both the celery export and normal tasks on the normal celery worker. Set this to lower the memory usage of Baserow in expense of performance. | |
|
||||
|
||||
### Backend Misc Configuration
|
||||
| Name | Description | Defaults |
|
||||
| ------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| BASEROW\_ENABLE\_SECURE\_PROXY\_SSL\_HEADER | Set to any non-empty value to ensure Baserow generates https:// next links provided by paginated API endpoints. Baserow will still work correctly if not enabled, this is purely for giving the correct https url for clients of the API. If you have setup Baserow to use Caddy's auto HTTPS or you have put Baserow behind<br>a Baserow behind a reverse proxy which:<br>* Handles HTTPS<br>* Strips the X-Forwarded-Proto header from all incoming requests.<br>* Sets the X-Forwarded-Proto header and sends it to Baserow.<br>Then you can safely set BASEROW\_ENABLE\_SECURE\_PROXY\_SSL\_HEADER=yes to ensure Baserow<br>generates https links for pagination correctly.<br> | |
|
||||
| ADDITIONAL\_APPS | A comma separated list of additional django applications to add to the INSTALLED\_APPS django setting | |
|
||||
| INITIAL\_TABLE\_DATA\_LIMIT | The amount of rows that can be imported when creating a table. Defaults to empty which means unlimited rows. | |
|
||||
| HOURS\_UNTIL\_TRASH\_PERMANENTLY\_DELETED | Items from the trash will be permanently deleted after this number of hours. | |
|
||||
| DISABLE\_ANONYMOUS\_PUBLIC\_VIEW\_WS\_CONNECTIONS | When sharing views publicly a websocket connection is opened to provide realtime updates to viewers of the public link. To disable this set any non empty value. When disabled publicly shared links will need to be refreshed to see any updates to the view. | |
|
||||
| DJANGO\_SETTINGS\_MODULE | **INTERNAL** The settings python module to load when starting up the Backend django server. You shouldn’t need to set this yourself unless you are customizing the settings manually. | |
|
||||
| | | |
|
||||
| BASEROW\_BACKEND\_BIND\_ADDRESS | **INTERNAL** The address that Baserow’s backend service will bind to. | |
|
||||
| BASEROW\_BACKEND\_PORT | **INTERNAL** Controls which port the Baserow backend service binds to. | |
|
||||
| BASEROW\_WEBFRONTEND\_BIND\_ADDRESS | **INTERNAL** The address that Baserow’s web-frontend service will bind to. | |
|
||||
|
||||
### User file upload Configuration
|
||||
| Name | Description | Defaults |
|
||||
| ------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| MEDIA\_URL | **INTERNAL** The URL at which user uploaded media files will be made available | $PUBLIC\_BACKEND\_URL/media/ |
|
||||
| MEDIA\_ROOT | **INTERNAL** The folder in which the backend will store user uploaded files | /baserow/media |
|
||||
| **<br>** | | |
|
||||
| AWS\_ACCESS\_KEY\_ID | The access key for your AWS account. When set to anything other than empty will switch Baserow to use a S3 compatible bucket for storing user file uploads. | |
|
||||
| AWS\_SECRET\_ACCESS\_KEY | The access secret key for your AWS account. | |
|
||||
| AWS\_STORAGE\_BUCKET\_NAME | Your Amazon Web Services storage bucket name. | |
|
||||
| AWS\_S3\_REGION\_NAME | **Optional** Name of the AWS S3 region to use (eg. eu-west-1) | |
|
||||
| AWS\_S3\_ENDPOINT\_URL | **Optional** Custom S3 URL to use when connecting to S3, including scheme. | |
|
||||
| AWS\_S3\_CUSTOM\_DOMAIN | **Optional** Your custom domain where the files can be downloaded from. | |
|
||||
|
||||
### Email Configuration
|
||||
| Name | Description | Defaults |
|
||||
| ------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| FROM\_EMAIL | The email address Baserow will send emails from. | |
|
||||
| EMAIL\_SMTP | If set to any non empty value then Baserow will start sending emails using the configuration options below. If not set then Baserow will not send emails and just log them to the Celery worker logs instead. | |
|
||||
| EMAIL\_SMTP\_USE\_TLS | If set to any non empty value then Baserow will attempt to send emails using TLS . | |
|
||||
| EMAIL\_SMTP\_HOST | The host of the external SMTP server that Baserow should use to send emails. | |
|
||||
| EMAIL\_SMTP\_PORT | The port used to connect to $EMAIL\_SMTP\_HOST on. | |
|
||||
| EMAIL\_SMTP\_USER | The username to authenticate with $EMAIL\_SMTP\_HOST when sending emails. | |
|
||||
| EMAIL\_SMTP\_PASSWORD | The password to authenticate with $EMAIL\_SMTP\_HOST when sending emails. | |
|
||||
|
||||
### Web-frontend Configuration
|
||||
| Name | Description | Defaults |
|
||||
| ------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| DOWNLOAD\_FILE\_VIA\_XHR | Set to \`1\` to force download links to download files via XHR query to bypass \`Content-Disposition: inline\` that can't be overridden in another way. If your files are stored under another origin, you also must add CORS headers to your server. | 0 |
|
||||
| BASEROW\_DISABLE\_PUBLIC\_URL\_CHECK | When opening the Baserow login page a check is run to ensure the PUBLIC\_BACKEND\_URL/BASEROW\_PUBLIC\_URL variables are set correctly and your browser can correctly connect to the backend. If misconfigured an error is shown. If you wish to disable this check and warning set this to any non empty value. | |
|
||||
|
||||
### `baserow/baserow` Image only Configuration
|
||||
| Name | Description | Defaults |
|
||||
| ------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| NO\_COLOR | Set this to any non empty value to disable colored logging in the all-in-one baserow image. | /baserow/data |
|
||||
| DATA\_DIR | For the all-in-one image only, this controls where Baserow will store all data that needs to be persisted. Inside this folder Baserow will store<br>\- Its postgres database<br>\- Redis database<br>\- Any autogenerated secrets like the django SECRET\_KEY, the postgresql database user password and the redis user password<br>\- Caddy will store its state + any certificates and keys it uses during auto https | |
|
||||
| DISABLE\_VOLUME\_CHECK | For the all-in-one image only setting this to any non empty value will disable the check it runs on startup that the “/baserow/data/” directory is mounted to a volume. | |
|
||||
@@ -1,5 +1,9 @@
|
||||
# Installation on Cloudron
|
||||
|
||||
> Any questions, problems or suggestions with this guide? Ask a question in our
|
||||
> [community](https://community.baserow.io/) or contribute the change yourself at
|
||||
> https://gitlab.com/bramw/baserow/-/tree/develop/docs .
|
||||
|
||||
Cloudron is a complete solution for running apps on your server and keeping them
|
||||
up-to-date and secure. If you don't have Cloudron installed on a server you can follow
|
||||
the [installation instructions here ](https://docs.cloudron.io/installation/). Ensure
|
||||
@@ -42,14 +46,14 @@ $ cd baserow/deploy/cloudron
|
||||
After that you can install the Baserow Cloudron app by executing the following commands.
|
||||
|
||||
```
|
||||
$ cloudron install -l baserow.{YOUR_DOMAIN} --image baserow/cloudron:1.8.2
|
||||
$ cloudron install -l baserow.{YOUR_DOMAIN} --image baserow/cloudron:1.8.3
|
||||
App is being installed.
|
||||
...
|
||||
App is installed.
|
||||
```
|
||||
|
||||
> All the available versions can be found here:
|
||||
> [https://gitlab.com/bramw/baserow/container_registry/1692077](https://gitlab.com/bramw/baserow/container_registry/1692077)
|
||||
> [https://hub.docker.com/r/baserow/cloudron](https://hub.docker.com/r/baserow/cloudron)
|
||||
|
||||
> If you get Failed to install app: 402 message: Missing token errors make sure you
|
||||
> have fully completed the installation of the cloudron server linked at the start.
|
||||
@@ -85,7 +89,7 @@ the `baserow/deploy/cloudron` folder, you can upgrade your cloudron baserow serv
|
||||
the latest version by running the following command:
|
||||
|
||||
```
|
||||
cloudron update --app {YOUR_APP_ID} --image baserow/cloudron:1.8.2
|
||||
cloudron update --app {YOUR_APP_ID} --image baserow/cloudron:1.8.3
|
||||
```
|
||||
|
||||
> Note that you must replace the image with the most recent image of Baserow. The
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
# Installation on Heroku
|
||||
|
||||
> Any questions, problems or suggestions with this guide? Ask a question in our
|
||||
> [community](https://community.baserow.io/) or contribute the change yourself at
|
||||
> https://gitlab.com/bramw/baserow/-/tree/develop/docs .
|
||||
|
||||
> The Heroku template and one click to deploy button are currently in beta.
|
||||
|
||||
Heroku is a platform as a service that enables developer to build, run and operate
|
||||
@@ -20,9 +24,9 @@ the free plan of Heroku by default.
|
||||
## Could not connect to the API server error
|
||||
|
||||
If you are getting a "Could not connect to the API server." error when logging in or
|
||||
creating an account, then you most likely need to update the `BASEROW_PUBLIC_URLS`
|
||||
creating an account, then you most likely need to update the `BASEROW_PUBLIC_URL`
|
||||
config var. You can do so by going to the settings page in your Heroku app dashboard,
|
||||
click on "Reveal Config Vars", find the `BASEROW_PUBLIC_URLS` and change the value to
|
||||
click on "Reveal Config Vars", find the `BASEROW_PUBLIC_URL` and change the value to
|
||||
`https://YOUR_APP_NAME.herokuapp.com`. Don't forget to replace `YOUR_APP_NAME` with the
|
||||
name of your app.
|
||||
|
||||
@@ -89,14 +93,14 @@ would need, you can do DYNO COUNT * BASEROW_AMOUNT_OF_WORKERS * 15.
|
||||
|
||||
If you added a custom domain, then you need to change a Config Var on the settings
|
||||
page. Go to the Settings page and click on "Reveal Config Vars". Here you need to set
|
||||
the `BASEROW_PUBLIC_URLS` value and add your own URL. If your domain is
|
||||
the `BASEROW_PUBLIC_URL` value and add your own URL. If your domain is
|
||||
`baserow-test.com` ,then the value should be `https://baserow-test.com`. If you don't
|
||||
have a custom domain then this value can be empty.
|
||||
|
||||
## Environment variables
|
||||
|
||||
* SECRET_KEY: A unique string that is used to generate secrets.
|
||||
* BASEROW_PUBLIC_URLS: The public URL of your Heroku Baserow app. If empty, the default
|
||||
* BASEROW_PUBLIC_URL: The public URL of your Heroku Baserow app. If empty, the default
|
||||
Heroku app URL is used, but if it differs it must be changed.
|
||||
(eg. https://baserow-test.com).
|
||||
* BASEROW_AMOUNT_OF_WORKERS: The amount of workers per dyno.
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
# Deprecated Guide - Installation on Ubuntu
|
||||
# Installation on Ubuntu
|
||||
|
||||
> Any questions, problems or suggestions with this guide? Ask a question in our
|
||||
> [community](https://community.baserow.io/) or contribute the change yourself at
|
||||
> https://gitlab.com/bramw/baserow/-/tree/develop/docs .
|
||||
|
||||
> If you installed Baserow 1.8.2 or earlier using this guide in version 1.8.2 please
|
||||
> See the upgrade section at the end of this guide.
|
||||
@@ -19,18 +23,18 @@ sudo apt install docker
|
||||
sudo usermod -aG docker $USER
|
||||
# Refresh the group so you don't need to relog to get docker permissions
|
||||
newgrp docker
|
||||
# Change BASEROW_PUBLIC_URLS to your domain name or http://YOUR_SERVERS_IP if you want
|
||||
# Change BASEROW_PUBLIC_URL to your domain name or http://YOUR_SERVERS_IP if you want
|
||||
# to access Baserow remotely.
|
||||
# This command will run Baserow with it's data stored in the new baserow_data docker
|
||||
# volume.
|
||||
docker run -e BASEROW_PUBLIC_URLS=http://localhost \
|
||||
docker run -e BASEROW_PUBLIC_URL=http://localhost \
|
||||
--name baserow \
|
||||
-d \
|
||||
--restart unless-stopped \
|
||||
-v baserow_data:/baserow/data \
|
||||
-p 80:80 \
|
||||
-p 443:443 \
|
||||
baserow/baserow:1.8.2
|
||||
baserow/baserow:1.8.3
|
||||
# Watch the logs for Baserow to come available by running:
|
||||
docker logs baserow
|
||||
```
|
||||
@@ -57,7 +61,7 @@ sudo apt install docker
|
||||
sudo usermod -aG docker $USER
|
||||
# When you are ready to stop your old Baserow server by running
|
||||
supervisorctl stop all
|
||||
# Change BASEROW_PUBLIC_URLS to your domain name or http://YOUR_SERVERS_IP if you want
|
||||
# Change BASEROW_PUBLIC_URL to your domain name or http://YOUR_SERVERS_IP if you want
|
||||
# to access Baserow remotely.
|
||||
# This command will run Baserow so it uses your existing postgresql database and your
|
||||
# existing user uploaded files in /baserow/media.
|
||||
@@ -66,14 +70,14 @@ supervisorctl stop all
|
||||
docker run \
|
||||
-d \
|
||||
--name baserow \
|
||||
-e BASEROW_PUBLIC_URLS=http://localhost \
|
||||
-e BASEROW_PUBLIC_URL=http://localhost \
|
||||
-e DATABASE_URL=postgresql://baserow:baserow@localhost:5432/baserow \
|
||||
--restart unless-stopped \
|
||||
-v baserow_data:/baserow/data \
|
||||
-v /baserow/media:/baserow/data/media \
|
||||
-p 80:80 \
|
||||
-p 443:443 \
|
||||
baserow/baserow:1.8.2
|
||||
baserow/baserow:1.8.3
|
||||
# Check the logs and wait for Baserow to become available
|
||||
docker logs baserow
|
||||
```
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
# Install using Standalone Images
|
||||
|
||||
> Any questions, problems or suggestions with this guide? Ask a question in our
|
||||
> [community](https://community.baserow.io/) or contribute the change yourself at
|
||||
> https://gitlab.com/bramw/baserow/-/tree/develop/docs .
|
||||
|
||||
> Docker version 19.03 is the minimum required to build Baserow. It is strongly
|
||||
> advised however that you install the latest version of Docker available.
|
||||
> Please check that your docker is up to date by running `docker -v`.
|
||||
|
||||
Baserow consists of a number of services, two of which are built and provided as
|
||||
separate standalone images by us:
|
||||
* `baserow/backend:1.8.3` which by default starts the Gunicorn Django backend server
|
||||
for Baserow but is also used to start the celery workers and celery beat services.
|
||||
* `baserow/web-frontend:1.8.3` which is a Nuxt server providing Server Side rendering
|
||||
for the website.
|
||||
|
||||
If you want to use your own container orchestration software like Kubernetes then these
|
||||
images let you run and scale these different parts of Baserow independently.
|
||||
|
||||
For an example of how to use these images see the
|
||||
[`docker-compose.yml`](https://gitlab.com/bramw/baserow/-/blob/master/docker-compose.yml)
|
||||
in the root of our repository.
|
||||
|
||||
## All Services needed to run Baserow
|
||||
|
||||
These are all the services you need to set up to run a Baserow using the standalone
|
||||
images:
|
||||
|
||||
* `baserow/backend:1.8.3` (default command is `gunicorn`)
|
||||
* `baserow/backend:1.8.3` with command `celery-worker`
|
||||
* `baserow/backend:1.8.3` with command `celery-export-worker`
|
||||
* `baserow/web-frontend:1.8.3` (default command is `nuxt-local`)
|
||||
* A postgres database
|
||||
* A redis server
|
||||
|
||||
## Configuration Caveats
|
||||
|
||||
* See [Configuring Baserow](configuration.md) for specific details on the supported
|
||||
environment variables.
|
||||
* You must set `BASEROW_PUBLIC_URL` (usually only when behind your a reverse proxy, see
|
||||
below for details) or `PUBLIC_BACKEND_URL` and `PUBLIC_WEB_FRONTEND_URL`
|
||||
* You must set `PRIVATE_BACKEND_URL` so the web-frontend server can make direct
|
||||
HTTP requests to the backend. The web-frontend might not have access to the
|
||||
`PUBLIC_BACKEND_URL` or `BASEROW_PUBLIC_URL`, or there could be a more direct internal
|
||||
route it could use. (e.g. from container to container instead of via the internet).
|
||||
* These images do not come with a Caddy Reverse proxy and so the
|
||||
`BASEROW_CADDY_ADDRESSES` environment variable used in other installation methods
|
||||
has no affect.
|
||||
* You must set a `SECRET_KEY` environment variable for the backend gunicorn server.
|
||||
* See our example [`Caddyfile`](https://gitlab.com/bramw/baserow/-/blob/master/Caddyfile)
|
||||
for an example on how to setup a reverse proxy correctly with Baserow. In summary you
|
||||
need to:
|
||||
* Redirect `/api/` and `/ws/` requests to the backend gunicorn service without
|
||||
dropping these prefixes.
|
||||
* Serve the files in the `/baserow/media` folder in the backend gunicorn service
|
||||
(share with your proxy using a volume) at the `/media` endpoint. Ensure
|
||||
that requests with a `dl` query parameter have a `Content-disposition` header added
|
||||
with the value of `attachment; filename=THE_DL_QUERY_PARAM_VALUE`
|
||||
* Send all other requests to the web-frontend service.
|
||||
* You must provide all email related environment variables to both the backend and
|
||||
celery-worker services. This is because the `celery-worker` service is the one
|
||||
actually connecting via SMTP to send emails.
|
||||
@@ -0,0 +1,245 @@
|
||||
# Install with Docker compose
|
||||
|
||||
> Any questions, problems or suggestions with this guide? Ask a question in our
|
||||
> [community](https://community.baserow.io/) or contribute the change yourself at
|
||||
> https://gitlab.com/bramw/baserow/-/tree/develop/docs .
|
||||
|
||||
## Installing requirements
|
||||
|
||||
If you haven't already installed docker and docker-compose on your computer you can do
|
||||
so by following the instructions on https://docs.docker.com/desktop/ and
|
||||
https://docs.docker.com/compose/install/.
|
||||
|
||||
> Docker-compose version 3.4 and Docker version 19.03 are the minimum versions
|
||||
> required by our provided files.
|
||||
|
||||
If you want to get the docker-compose.yml via git then you can install it by following
|
||||
https://www.linode.com/docs/development/version-control/how-to-install-git-on-linux-mac-and-windows/
|
||||
.
|
||||
|
||||
After installing all the required software you should be able to run the following
|
||||
commands in your terminal.
|
||||
|
||||
```
|
||||
$ docker -v
|
||||
Docker version 20.10.12, build e91ed57
|
||||
$ docker-compose -v
|
||||
docker-compose version 1.26.2, build eefe0d31
|
||||
$ git --version
|
||||
git version 2.25.1
|
||||
```
|
||||
|
||||
If all commands return something similar as described in the example, then you are ready
|
||||
to proceed!
|
||||
|
||||
## Downloading the Baserow example docker-compose.yml
|
||||
|
||||
You can download the example Baserow `docker-compose.yml` by either directly downloading
|
||||
the file from
|
||||
[https://gitlab.com/bramw/baserow/-/blob/master/docker-compose.yml](https://gitlab.com/bramw/baserow/-/blob/master/docker-compose.yml)
|
||||
and running:
|
||||
```bash
|
||||
curl -o docker-compose.yml https://gitlab.com/bramw/baserow/-/blob/master/docker-compose.yml
|
||||
docker-compose up -f
|
||||
```
|
||||
or by directly cloning our git repo so you can get updates easier:
|
||||
```bash
|
||||
$ cd ~/baserow
|
||||
$ git clone --depth=1 --branch master https://gitlab.com/bramw/baserow.git
|
||||
$ cd baserow
|
||||
$ docker-compose up -d
|
||||
# To update to the latest run:
|
||||
docker-compose down
|
||||
git pull
|
||||
docker-compose up -d
|
||||
```
|
||||
|
||||
> There is a security flaw with docker and the ufw firewall.
|
||||
> By default docker when exposing ports on 0.0.0.0 will bypass any ufw firewall rules
|
||||
> and expose the above container publicly from your machine on its network. If this
|
||||
> is not intended then please set HOST_PUBLISH_IP to 127.0.0.1 so Baserow can only be
|
||||
> accessed from the machine it is running on.
|
||||
> Please see https://github.com/chaifeng/ufw-docker for more information and how to
|
||||
> setup ufw to work securely with docker.
|
||||
|
||||
## Usage
|
||||
|
||||
To use this docker-compose.yml to run Baserow you must set the three required
|
||||
environment variables in the `x-backend-required-variables` section inside the
|
||||
`docker-compose.yml` and review the variables in the `x-common-important-variables`
|
||||
section. If you receive the following error it is because you need to set the required
|
||||
environment variables first:
|
||||
```
|
||||
ERROR: Missing mandatory value for "environment" option interpolating
|
||||
```
|
||||
|
||||
If you are upgrading from Baserow 1.8.2 or earlier please read the additional section
|
||||
below.
|
||||
|
||||
See [Configuring Baserow](configuration.md) for information on the
|
||||
other environment variables you can configure.
|
||||
|
||||
## How to set environment variables
|
||||
|
||||
You can set these variables by using docker-compose env file
|
||||
(https://docs.docker.com/compose/environment-variables/#the-env-file):
|
||||
1. Copy the `.env.example` file found in the root of Baserows repository
|
||||
(https://gitlab.com/bramw/baserow/-/blob/master/.env.example) to `.env`:
|
||||
```
|
||||
curl -o .env https://gitlab.com/bramw/baserow/-/blob/master/.env.example
|
||||
```
|
||||
2. Edit `.env` and provide values for the missing environment variables.
|
||||
3. `docker-compose up`
|
||||
|
||||
Alternatively you can set these variables by either running docker-compose with
|
||||
the environment variables set on the command line (fill in secure values first):
|
||||
```
|
||||
SECRET_KEY= DATABASE_PASSWORD= REDIS_PASSWORD= docker-compose up
|
||||
```
|
||||
|
||||
## Upgrading from Baserow 1.8.2's docker-compose file
|
||||
|
||||
To upgrade from 1.8.2's docker-compose file from inside the Baserow git repo you need to:
|
||||
1. Stop your existing Baserow install when safe to do so:
|
||||
`docker-compose down`
|
||||
2. `git pull`
|
||||
3. Copy `.env.example` to `.env` and edit `.env` filling in the missing variables
|
||||
below:
|
||||
- `SECRET_KEY` to a secure value, existing logins sessions will be invalidated.
|
||||
- `DATABASE_PASSWORD` to a secure password (this defaulted to 'baserow' before, in
|
||||
step 3 we are going to change the database users password to the value you set)
|
||||
- `REDIS_PASSWORD` to a secure password.
|
||||
- `WEB_FRONTEND_PORT` back to 3000 if you want to continue accessing Baserow on
|
||||
that port (it now defaults to 80).
|
||||
- `BASEROW_PUBLIC_URL` to the URL/IP/Domain you were using access Baserow remotely
|
||||
(it must begin with http:// or https://). If you have set `WEB_FRONTEND_PORT` to
|
||||
anything but 80 you must append it to the end of `BASEROW_PUBLIC_URL`.
|
||||
- `BASEROW_CADDY_ADDRESSES` configures which addresses the new internal Caddy reverse
|
||||
proxy listens on. By default, it will serve http only, enable automatic https
|
||||
by setting to `https://YOUR_DOMAIN_NAME.com`. Append `,http://localhost` if you
|
||||
still want to be able to access Baserow from `localhost`.
|
||||
4. Run the command below which will change the baserow postgresql users password to
|
||||
what you have set in step 1 in the .env file (no need to edit the command):
|
||||
```
|
||||
docker-compose run --rm backend bash -c "PGPASSWORD=baserow psql -h db -U baserow -c \"ALTER USER baserow WITH PASSWORD '$DATABASE_PASSWORD';\" && echo 'Successfully changed Baserow's db user password'"
|
||||
```
|
||||
5. `docker-compose up -d`
|
||||
|
||||
|
||||
## How To
|
||||
|
||||
### Running management commands
|
||||
|
||||
You can see and run the Baserow backend management commands like so:
|
||||
```bash
|
||||
docker-compose exec backend /baserow/backend/docker/docker-entrypoint.sh help
|
||||
```
|
||||
|
||||
### View the logs
|
||||
|
||||
```bash
|
||||
$ docker-compose logs
|
||||
```
|
||||
|
||||
### Run Baserow alongside existing services
|
||||
|
||||
Baserow's docker-compose files will automatically expose the `caddy` service on your
|
||||
network on ports 80 and 433 by default. If you already have applications or
|
||||
services using those ports the Baserow service which uses that port will crash. To fix
|
||||
this you can set the `WEB_FRONTEND_PORT` variable to change the default of port 80 and
|
||||
`WEB_FRONTEND_SSL_PORT` to change the default port of 443.
|
||||
|
||||
```bash
|
||||
$ WEB_FRONTEND_SSL_PORT=444 WEB_FRONTEND_PORT=3000 docker-compose up
|
||||
```
|
||||
|
||||
### Using a Domain with automatic https
|
||||
|
||||
If you have a domain name and have correctly configured DNS then you can run the
|
||||
following command to make Baserow available at the domain with
|
||||
[automatic https](https://caddyserver.com/docs/automatic-https#overview) provided by
|
||||
Caddy.
|
||||
|
||||
> Append `,http://localhost` to BASEROW_CADDY_ADDRESSES if you still want to be able to
|
||||
> access your server from the machine it is running on using http://localhost. See
|
||||
> [Caddy's Address Docs](https://caddyserver.com/docs/caddyfile/concepts#addresses)
|
||||
> for all supported values for BASEROW_CADDY_ADDRESSES.
|
||||
|
||||
```bash
|
||||
BASEROW_PUBLIC_URL=https://www.REPLACE_WITH_YOUR_DOMAIN.com \
|
||||
BASEROW_CADDY_ADDRESSES=https://www.REPLACE_WITH_YOUR_DOMAIN.com \
|
||||
docker-compose up
|
||||
```
|
||||
|
||||
### Behind a reverse proxy already handling ssl
|
||||
|
||||
```bash
|
||||
WEB_FRONTEND_SSL_PORT= \
|
||||
BASEROW_PUBLIC_URL=https://www.REPLACE_WITH_YOUR_DOMAIN.com \
|
||||
docker-compose up
|
||||
```
|
||||
|
||||
### On a nonstandard HTTP port
|
||||
|
||||
```bash
|
||||
WEB_FRONTEND_PORT=3000 \
|
||||
BASEROW_PUBLIC_URL=https://www.REPLACE_WITH_YOUR_DOMAIN.com:3000 \
|
||||
docker-compose up
|
||||
```
|
||||
|
||||
### Disable automatic migration
|
||||
|
||||
You can disable automatic migration by setting the `MIGRATE_ON_STARTUP` environment
|
||||
variable to `false` (or any value which is not `true`) like so:
|
||||
|
||||
```bash
|
||||
MIGRATE_ON_STARTUP=false docker-compose up -d
|
||||
```
|
||||
|
||||
### Run a one off migration
|
||||
|
||||
```bash
|
||||
# Use run if you have stopped your docker-compose environment
|
||||
docker-compose run backend manage migrate
|
||||
# Use exec otherwise
|
||||
docker-compose exec backend /baserow/backend/docker/docker-entrypoint.sh manage migrate
|
||||
```
|
||||
|
||||
### Disable automatic template syncing
|
||||
|
||||
You can disable automatic baserow template syncing by setting the
|
||||
`SYNC_TEMPLATES_ON_STARTUP` environment variable to `false` (or any value which is
|
||||
not `true`) like so:
|
||||
|
||||
```bash
|
||||
SYNC_TEMPLATES_ON_STARTUP=false docker-compose up -d
|
||||
```
|
||||
|
||||
### Back-up your Baserow DB
|
||||
|
||||
1. Please read the output of `docker-compose run backend manage backup_baserow --help`.
|
||||
2. Please ensure you only back-up a Baserow database which is not actively being used
|
||||
by a running Baserow instance or any other process which is making changes to the
|
||||
database.
|
||||
|
||||
```bash
|
||||
mkdir ~/baserow_backups
|
||||
# The folder must be the same UID:GID as the user running inside the container, which
|
||||
# for the local env is 9999:9999, for the dev env it is 1000:1000 or your own UID:GID
|
||||
# when using ./dev.sh
|
||||
sudo chown 9999:9999 ~/baserow_backups/
|
||||
docker-compose run -v ~/baserow_backups:/baserow/backups backend backup -f /baserow/backups/baserow_backup.tar.gz
|
||||
# backups/ now contains your Baserow backup.
|
||||
```
|
||||
|
||||
### Restore your Baserow DB from a back-up
|
||||
|
||||
1. Please read the output of `docker-compose run backend manage restore_baserow --help`
|
||||
1. Please ensure you never restore Baserow using a pooled connection but instead do
|
||||
the restoration via direct database connection.
|
||||
1. Make a new, empty database to restore the back-up file into, please do not overwrite
|
||||
existing databases as this might cause database inconsistency errors.
|
||||
|
||||
```bash
|
||||
docker-compose run -v ~/baserow_backups:/baserow/backups backend restore -f /baserow/backups/baserow_backup.tar.gz
|
||||
```
|
||||
@@ -1,54 +1,229 @@
|
||||
== Baserow
|
||||
# Install with Docker
|
||||
|
||||
=== Run baserow with auto ssl
|
||||
> Any questions, problems or suggestions with this guide? Ask a question in our
|
||||
> [community](https://community.baserow.io/) or contribute the change yourself at
|
||||
> https://gitlab.com/bramw/baserow/-/tree/develop/docs .
|
||||
|
||||
> Docker version 19.03 is the minimum required to use Baserow. It is strongly
|
||||
> advised however that you install the latest version of Docker available.
|
||||
> Please check that your docker is up-to date by running `docker -v`.
|
||||
|
||||
This guide assumes you already have Docker installed and have permissions to run Docker
|
||||
containers. See the [Install on Ubuntu](install-on-ubuntu.md) for a installation from
|
||||
scratch instead.
|
||||
|
||||
## Quick Start
|
||||
|
||||
Run the command below to start a Baserow server running locally listening on port `80`.
|
||||
You will only be able to connect to Baserow from the machine running the server via
|
||||
`http://localhost`.
|
||||
|
||||
```bash
|
||||
docker run \
|
||||
-d \
|
||||
--name baserow \
|
||||
-e BASEROW_PUBLIC_URLS=https://www.yourdomain.com \
|
||||
-e BASEROW_PUBLIC_URL=http://localhost \
|
||||
-v baserow_data:/baserow/data \
|
||||
-p 80:80 \
|
||||
-p 443:443 \
|
||||
baserow/baserow:1.8.2
|
||||
--restart unless-stopped \
|
||||
baserow/baserow:1.8.3
|
||||
```
|
||||
=== Run baserow behind a reverse proxy already handling ssl
|
||||
|
||||
* Change `BASEROW_PUBLIC_URL` to `https://YOUR_DOMAIN` or `http://YOUR_IP` to enable
|
||||
external access.
|
||||
* Add `-e BASEROW_CADDY_ADDRESSES=https://YOUR_DOMAIN` to enable
|
||||
[automatic Caddy HTTPS](https://caddyserver.com/docs/caddyfile/automatic-https#overview).
|
||||
* Optionally add `-e DATABASE_URL=postgresql://user:pwd@host:port/db` to use an external
|
||||
Postgresql.
|
||||
* Optionally add `-e REDIS_URL=redis://user:pwd@host:port` to use an external Redis.
|
||||
|
||||
> There is a security flaw with docker and the ufw firewall.
|
||||
> By default docker when exposing ports on 0.0.0.0 will bypass any ufw firewall rules
|
||||
> and expose the above container publicly from your machine on its network. If this
|
||||
> is not intended then run with the following ports instead:
|
||||
> `-p 127.0.0.1:80:80 -p 127.0.0.1:443:443` which makes your Baserow only accessible
|
||||
> from the machine it is running on.
|
||||
> Please see https://github.com/chaifeng/ufw-docker for more information and how to
|
||||
> setup ufw to work securely with docker.
|
||||
|
||||
## Image Feature Overview
|
||||
|
||||
The `baserow/baserow:1.8.3` image by default runs all of Baserow's various services in a
|
||||
single container for ease of use. A quick summary of its features are:
|
||||
|
||||
* Runs a Postgres database and Redis server by default internally and stores all data in
|
||||
the `/baserow/data` folder inside the container.
|
||||
* Set `DATABASE_URL` or the `DATABASE_...` variables to disable the internal postgres
|
||||
and instead connect to an external Postgres.
|
||||
* Set `REDIS_URL` or the `REDIS_...` variables to disable the internal redis and instead
|
||||
connect to an external Postgres.
|
||||
* Runs all services behind a pre-configured Caddy reverse proxy. Set
|
||||
`BASEROW_CADDY_ADDRESSES` to `https://YOUR_DOMAIN.com` and it will
|
||||
[automaticly enable https](https://caddyserver.com/docs/automatic-https#overview) for
|
||||
you and store the keys and certs in `/baserow/data/caddy`.
|
||||
* Provides a CLI for execing admin commands against a running Baserow container or
|
||||
running one off commands against just a Baserow data volume.
|
||||
|
||||
## Example Commands
|
||||
|
||||
See [Configuring Baserow](configuration.md) for more detailed information on all the
|
||||
other environment variables you can configure.
|
||||
|
||||
### Using a Domain with automatic https
|
||||
|
||||
If you have a domain name and have correctly configured DNS then you can run the
|
||||
following command to make Baserow available at the domain with
|
||||
[automatic https](https://caddyserver.com/docs/automatic-https#overview) provided by
|
||||
Caddy.
|
||||
|
||||
> Append `,http://localhost` to BASEROW_CADDY_ADDRESSES if you still want to be able to
|
||||
> access your server from the machine it is running on using http://localhost. See
|
||||
> [Caddy's Address Docs](https://caddyserver.com/docs/caddyfile/concepts#addresses)
|
||||
> for all supported values for BASEROW_CADDY_ADDRESSES.
|
||||
|
||||
```bash
|
||||
docker run \
|
||||
-d \
|
||||
--name baserow \
|
||||
-e BASEROW_PUBLIC_URLS=https://www.yourdomain.com \
|
||||
-e BASEROW_CADDY_GLOBAL_CONF="auto_https off" \
|
||||
-e BASEROW_PUBLIC_URL=https://www.REPLACE_WITH_YOUR_DOMAIN.com \
|
||||
-e BASEROW_CADDY_ADDRESSES=https://www.REPLACE_WITH_YOUR_DOMAIN.com \
|
||||
-v baserow_data:/baserow/data \
|
||||
-p 80:80 \
|
||||
-p 443:443 \
|
||||
baserow/baserow:1.8.2
|
||||
--restart unless-stopped \
|
||||
baserow/baserow:1.8.3
|
||||
```
|
||||
|
||||
=== Run Baserow on a nonstandard HTTP port
|
||||
### Behind a reverse proxy already handling ssl
|
||||
|
||||
```bash
|
||||
docker run \
|
||||
-d \
|
||||
--name baserow \
|
||||
-e BASEROW_PUBLIC_URLS=https://www.yourdomain.com:3001 \
|
||||
-e BASEROW_PUBLIC_URL=https://www.yourdomain.com \
|
||||
-v baserow_data:/baserow/data \
|
||||
-p 80:80 \
|
||||
-p 3001:3001 \
|
||||
baserow/baserow:1.8.2
|
||||
--restart unless-stopped \
|
||||
baserow/baserow:1.8.3
|
||||
```
|
||||
|
||||
=== Launch only the embedded Postgres server so the Baserow postgres database can be directly accessed
|
||||
### On a nonstandard HTTP port
|
||||
|
||||
```bash
|
||||
docker run \
|
||||
-d \
|
||||
--name baserow \
|
||||
-e BASEROW_PUBLIC_URL=https://www.yourdomain.com:3001 \
|
||||
-v baserow_data:/baserow/data \
|
||||
-p 3001:80 \
|
||||
--restart unless-stopped \
|
||||
baserow/baserow:1.8.3
|
||||
```
|
||||
|
||||
### With an external PostgresSQL server
|
||||
|
||||
```bash
|
||||
docker run \
|
||||
-d \
|
||||
--name baserow \
|
||||
-e BASEROW_PUBLIC_URL=https://www.yourdomain.com \
|
||||
-e DATABASE_HOST=TODO \
|
||||
-e DATABASE_NAME=TODO \
|
||||
-e DATABASE_USER=TODO \
|
||||
-e DATABASE_PASSWORD=TODO \
|
||||
-e DATABASE_PORT=TODO \
|
||||
-v baserow_data:/baserow/data \
|
||||
-p 80:80 \
|
||||
-p 443:443 \
|
||||
--restart unless-stopped \
|
||||
baserow/baserow:1.8.3
|
||||
```
|
||||
|
||||
### With an external Redis server
|
||||
|
||||
```bash
|
||||
docker run \
|
||||
-d \
|
||||
--name baserow \
|
||||
-e BASEROW_PUBLIC_URL=https://www.yourdomain.com \
|
||||
-e REDIS_HOST=TODO \
|
||||
-e REDIS_USER=TODO \
|
||||
-e REDIS_PASSWORD=TODO \
|
||||
-e REDIS_PORT=TODO \
|
||||
-e REDIS_PROTOCOL=TODO \
|
||||
-v baserow_data:/baserow/data \
|
||||
-p 80:80 \
|
||||
-p 443:443 \
|
||||
--restart unless-stopped \
|
||||
baserow/baserow:1.8.3
|
||||
```
|
||||
|
||||
### With an external email server
|
||||
|
||||
```bash
|
||||
docker run \
|
||||
-d \
|
||||
--name baserow \
|
||||
-e BASEROW_PUBLIC_URL=https://www.yourdomain.com \
|
||||
-e EMAIL_SMTP=True \
|
||||
-e EMAIL_SMTP_HOST=TODO \
|
||||
-e EMAIL_SMTP_PORT=TODO \
|
||||
-e EMAIL_SMTP_USER=TODO \
|
||||
-e EMAIL_SMTP_PASSWORD=TODO \
|
||||
-e EMAIL_SMTP_USE_TLS= \
|
||||
-v baserow_data:/baserow/data \
|
||||
-p 80:80 \
|
||||
-p 443:443 \
|
||||
--restart unless-stopped \
|
||||
baserow/baserow:1.8.3
|
||||
```
|
||||
|
||||
### Start just the embedded database
|
||||
|
||||
If you want to directly access the embedded Postgresql database then you can run:
|
||||
|
||||
```bash
|
||||
docker run -it --rm -p 5432:5432 -v baserow_data:/baserow/data baserow/baserow:1.8.2 db_only
|
||||
# Now you can connect on your host machine to the Baserow postgres database at port 5432
|
||||
docker run -it \
|
||||
--rm \
|
||||
--name baserow \
|
||||
-p 5432:5432 \
|
||||
-v baserow_data:/baserow/data \
|
||||
baserow/baserow:1.8.3 \
|
||||
start-only-db
|
||||
# Now get the password from
|
||||
docker exec -it baserow cat /baserow/data/.pgpass
|
||||
# Finally connect on your host machine to the Baserow postgres database at port 5432
|
||||
# the password above with the username `baserow`.
|
||||
```
|
||||
|
||||
=== Backup all of Baserow
|
||||
### Run a one off command on the database
|
||||
|
||||
If you want to run a one off backend command against your Baserow data volume without
|
||||
starting Baserow normally you can do so with the `backend-cmd-with-db` argument like so:
|
||||
|
||||
```bash
|
||||
docker run -it \
|
||||
--rm \
|
||||
--name baserow \
|
||||
-v baserow_data:/baserow/data \
|
||||
baserow/baserow:1.8.3 \
|
||||
backend-cmd-with-db manage dbshell
|
||||
```
|
||||
|
||||
## Backing up and Restoring Baserow
|
||||
|
||||
Baserow stores all of its persistent data in the `/baserow/data` directory by default.
|
||||
We strongly recommend you mount a docker volume into this location to persist
|
||||
Baserows data so you do not lose it if you accidentally delete your Baserow container.
|
||||
|
||||
> The backup and restore operations discussed below are best done on a Baserow server
|
||||
> which is not being used.
|
||||
|
||||
### Backup all of Baserow
|
||||
|
||||
This will backup:
|
||||
|
||||
1. Baserows postgres database (This will be a raw copy of the PGDATA dir and hence not
|
||||
easily portable, see the section below on how to backup just the postgres db in a
|
||||
more portable way.)
|
||||
@@ -57,88 +232,139 @@ This will backup:
|
||||
Caddy.
|
||||
3. The Redis servers state. This is not strictly needed.
|
||||
|
||||
Baserow stores all of its state in the folder found in /baserow/data. We strongly
|
||||
recommend you mount a docker volume into this location to persist Baserows data.
|
||||
Otherwise if you remove the Baserow container you will loose all of your data.
|
||||
Otherwise if you remove the Baserow container you will lose all of your data.
|
||||
|
||||
The command below assumes you have been running Baserow with the
|
||||
`-v baserow_data:/baserow/data` volume. Please change this argument accordingly if
|
||||
you have mounted the /baserow/data folder differently.
|
||||
`-v baserow_data:/baserow/data` volume. Please change this argument accordingly if you
|
||||
have mounted the /baserow/data folder differently.
|
||||
|
||||
```bash
|
||||
# Ensure Baserow is stopped first before taking a backup.
|
||||
docker stop baserow
|
||||
docker run --rm -v baserow_data:/baserow/data -v $(pwd):/backup ubuntu tar cvf /backup/backup.tar /baserow/data
|
||||
docker run --rm -v baserow_data:/baserow/data -v $PWD:/backup ubuntu tar cvf /backup/backup.tar /baserow/data
|
||||
```
|
||||
|
||||
=== Restore all of Baserow
|
||||
### Restore all of Baserow
|
||||
|
||||
```bash
|
||||
# Ensure Baserow is stopped first before taking a backup.
|
||||
docker stop baserow
|
||||
docker run --rm -v baserow_data:/baserow/data -v $(pwd):/backup ubuntu tar cvf /backup/backup.tar /baserow/data
|
||||
docker run --rm -v new_baserow_data_volume $(pwd):/backup ubuntu bash -c "mkdir -p /baserow/data && cd /baserow/data && tar xvf /backup/backup.tar --strip 1"
|
||||
docker run --rm -v baserow_data:/baserow/data -v $PWD:/backup ubuntu tar cvf /backup/backup.tar /baserow/data
|
||||
docker run --rm -v new_baserow_data_volume $PWD:/backup ubuntu bash -c "mkdir -p /baserow/data && cd /baserow/data && tar xvf /backup/backup.tar --strip 1"
|
||||
```
|
||||
|
||||
=== Backup Baserows Postgres database
|
||||
### Backup only Baserow's Postgres database
|
||||
|
||||
Baserow stores all of its own data in Postgres. To backup just this database you can
|
||||
run the command below.
|
||||
Please ensure you only back-up a Baserow database which is not actively being used
|
||||
by a running Baserow instance or any other process which is making changes to the
|
||||
database.
|
||||
|
||||
Baserow stores all of its own data in Postgres. To backup just this database you can run
|
||||
the command below.
|
||||
|
||||
```bash
|
||||
# First read the help message for this command
|
||||
docker run -it --rm -v baserow_data:/baserow/data baserow/baserow:1.8.3 \
|
||||
backend-cmd-with-db backup
|
||||
|
||||
# By default backs up to the backups folder in the baserow_data volume.
|
||||
docker run -it --rm -v baserow_data:/baserow/data baserow backend_with_db backup -f /baserow/data/backups/backup.tar.gz
|
||||
docker run -it --rm -v baserow_data:/baserow/data baserow/baserow:1.8.3 \
|
||||
backend-cmd-with-db backup -f /baserow/data/backups/backup.tar.gz
|
||||
|
||||
# Or backup to a file on your host instead run something like:
|
||||
docker run -it --rm -v baserow_data:/baserow/data -v $(pwd):/baserow/host baserow backend_with_db backup -f /baserow/host/backup.tar.gz
|
||||
docker run -it --rm -v baserow_data:/baserow/data -v $PWD:/baserow/host \
|
||||
baserow/baserow:1.8.3 backend-cmd-with-db backup -f /baserow/host/backup.tar.gz
|
||||
```
|
||||
|
||||
=== Restore Baserow
|
||||
### Restore only Baserow's Postgres Database
|
||||
|
||||
When restoring Baserow you must ensure you are restoring into a brand new Baserow data
|
||||
volume.
|
||||
|
||||
```bash
|
||||
docker run -it --rm \
|
||||
-v old_baserow_data_volume_containing_the_backup_tar_gz:/baserow/old_data \
|
||||
-v new_baserow_data_volume_to_restore_into:/baserow/data \
|
||||
baserow backend_with_db restore -f /baserow/old_data/backup.tar.gz
|
||||
baserow backend-cmd-with-db restore -f /baserow/old_data/backup.tar.gz
|
||||
|
||||
# Or to restore from a file on your host instead run something like:
|
||||
docker run -it --rm \
|
||||
-v baserow_data:/baserow/data -v \
|
||||
$(pwd):/baserow/host \
|
||||
baserow backend_with_db restore -f /baserow/host/backup.tar.gz
|
||||
baserow backend-cmd-with-db restore -f /baserow/host/backup.tar.gz
|
||||
```
|
||||
|
||||
== Running healthchecks on Baserow
|
||||
## Running healthchecks on Baserow
|
||||
|
||||
The Dockerimage already defines a HEALTHCHECK command which will be used by software
|
||||
The Dockerfile already defines a HEALTHCHECK command which will be used by software
|
||||
that supports it. However if you wish to trigger a healthcheck yourself on a running
|
||||
Baserow container then you can run:
|
||||
|
||||
```bash
|
||||
docker exec baserow ./baserow.sh backend backend-healthcheck
|
||||
docker exec baserow ./baserow.sh backend-cmd backend-healthcheck
|
||||
# Run the below to see all available healthchecks
|
||||
docker exec baserow ./baserow.sh backend-cmd help
|
||||
```
|
||||
|
||||
== Running Baserows or Djangos management commands
|
||||
## Running Baserow or Django management commands
|
||||
|
||||
You can run management commands on an existing Baserow container called baserow
|
||||
by running the following to see the available commands:
|
||||
You can run management commands on an existing Baserow container called baserow by
|
||||
running the following to see the available commands:
|
||||
|
||||
```bash
|
||||
docker exec baserow ./baserow.sh backend manage
|
||||
docker exec baserow ./baserow.sh backend manage
|
||||
docker exec baserow ./baserow.sh backend-cmd manage
|
||||
# For example you could migrate the database of a running Baserow using:
|
||||
docker exec baserow ./baserow.sh backend-cmd manage migrate
|
||||
```
|
||||
|
||||
== Customizing Baserow
|
||||
## Customizing Baserow
|
||||
|
||||
=== Building your own image from Baserow
|
||||
### Mounting in a config file
|
||||
|
||||
``````
|
||||
FROM baserow/baserow:1.8.2
|
||||
Baserow will automatically source any `.sh` files found in `/baserow/supervisor/env/` or
|
||||
`/baserow/data/env/` on startup. Use this to create a single config file to configure
|
||||
your Baserow like so:
|
||||
|
||||
```bash
|
||||
custom_baserow_conf.sh << EOF
|
||||
export BASEROW_PUBLIC_URL=todo
|
||||
export BASEROW_CADDY_ADDRESSES=todo
|
||||
|
||||
# You can perform any Bash logic required in here to setup Baserow conditionally.
|
||||
EOF
|
||||
|
||||
docker run \
|
||||
-d \
|
||||
--name baserow \
|
||||
-e BASEROW_PUBLIC_URL=http://localhost \
|
||||
-v $PWD/custom_baserow_conf.sh /baserow/supervisor/custom_baserow_conf.sh \
|
||||
-v baserow_data:/baserow/data \
|
||||
-p 80:80 \
|
||||
-p 443:443 \
|
||||
--restart unless-stopped \
|
||||
baserow/baserow:1.8.3
|
||||
```
|
||||
|
||||
Or you can just store it directly in the volume at `baserow_data/env` meaning it will
|
||||
be loaded whenever you mount in this data volume.
|
||||
|
||||
|
||||
### Building your own image from Baserow
|
||||
|
||||
```dockerfile
|
||||
FROM baserow/baserow:1.8.3
|
||||
|
||||
# Any .sh files found in /baserow/supervisor/env/ will be sourced and loaded at startup
|
||||
# useful for storing your own environment variable overrides.
|
||||
COPY custom_env.sh /baserow/supervisor/env/custom_env.sh
|
||||
|
||||
== Making Baserow available on a domain name
|
||||
# Set the DATA_DIR environment variable to change where Baserow stores its persistant
|
||||
# data. At startup Baserow will attempt to chown and setup this folder correctly.
|
||||
ENV DATA_DIR=/baserow/data
|
||||
|
||||
=== Without https
|
||||
By default if you set BASEROW_PUBLIC_URLS to a standard name like www.mydomain.com it will attempt
|
||||
to automatically enable SSL. If you wish to disable this behaviour indicate this by
|
||||
changing your BASEROW_PUBLIC_URLS to www.mydomain.com:80 and only bind on the HTTP port.
|
||||
# This image bakes in its own default user with UID/GID of 9999:9999 by default. To
|
||||
# Set this to change the user Baserow will run its Caddy, backend, Celery and
|
||||
# web-frontend services as. However be warned, the default entrypoint needs to be run
|
||||
# as root so using USER may break things.
|
||||
ENV DOCKER_USER=baserow_docker_user
|
||||
```
|
||||
@@ -4,10 +4,10 @@
|
||||
1. Please ensure you only back-up a Baserow database which is not actively being used
|
||||
by a running Baserow instance or any other process which is making changes to the
|
||||
database.
|
||||
1. Please create PGPASS file to store the password for your database, see
|
||||
https://www.postgresql.org/docs/11/libpq-pgpass.html for more details on this file.
|
||||
1. Please read and understand the output of `./baserow backup_baserow --help`
|
||||
1. Run the following command to back-up Baserow.
|
||||
2. Please create PGPASS file to store the password for your database, see
|
||||
https://www.postgresql.org/docs/11/libpq-pgpass.html for more details on this file.
|
||||
3. Please read and understand the output of `./baserow backup_baserow --help`
|
||||
4. Run the following command to back-up Baserow.
|
||||
`PGPASSFILE=PATH_TO_YOUR_PGPASSFILE ./baserow backup_baserow -h YOUR_DB_HOST -d YOUR_DB_NAME -U YOUR_DB_USER -p YOUR_DB_PORT`
|
||||
|
||||
## Restoring Baserow
|
||||
|
||||
@@ -15,7 +15,7 @@ which does not exist on the different machine, which is the usual cause of this
|
||||
|
||||
## Fixing a Docker Install
|
||||
|
||||
Ensure you have set the environment variable `BASEROW_PUBLIC_URLS` to the URL you are
|
||||
Ensure you have set the environment variable `BASEROW_PUBLIC_URL` to the URL you are
|
||||
using the access Baserow on. The following three sections show how to do this depending
|
||||
on how you are accessing your Baserow server.
|
||||
|
||||
@@ -25,7 +25,20 @@ If you are accessing your Baserow server using a domain name then you should lau
|
||||
Baserow like so:
|
||||
```bash
|
||||
docker run \
|
||||
-e BASEROW_PUBLIC_URLS=https://YOUR_DOMAIN_HERE \
|
||||
-e BASEROW_PUBLIC_URL=https://YOUR_DOMAIN_HERE \
|
||||
# ... followed by the rest of your normal baserow docker arguments
|
||||
```
|
||||
|
||||
### Access via a domain name with automatic HTTPS
|
||||
|
||||
If you are accessing your Baserow server using a domain name and you want the Baserow
|
||||
Caddy server to automatically handle HTTPS for you then launch Baserow like so. If
|
||||
you still want to be able to access your Baserow from http://localhost add
|
||||
`,http://localhost` onto the BASEROW_CADDY_ADDRESSES.
|
||||
```bash
|
||||
docker run \
|
||||
-e BASEROW_PUBLIC_URL=https://YOUR_DOMAIN_HERE \
|
||||
-e BASEROW_CADDY_ADDRESSES=https://YOUR_DOMAIN_HERE \
|
||||
# ... followed by the rest of your normal baserow docker arguments
|
||||
```
|
||||
|
||||
@@ -35,7 +48,7 @@ If you are accessing your Baserow server using an IP address then you should lau
|
||||
Baserow like so:
|
||||
```bash
|
||||
docker run \
|
||||
-e BASEROW_PUBLIC_URLS=http://YOUR_IP_ADDRESS_HERE \
|
||||
-e BASEROW_PUBLIC_URL=http://YOUR_IP_ADDRESS_HERE \
|
||||
# ... followed by the rest of your normal baserow docker arguments
|
||||
```
|
||||
|
||||
@@ -44,27 +57,27 @@ docker run \
|
||||
If you have or want to access Baserow using a different port other than 80 (`-p 80:80`)
|
||||
then you also need to set the environment variable `WEB_FRONTEND_PORT`. You also need
|
||||
to ensure you properly change the `-p 80:80` argument to
|
||||
`-p YOUR_CUSTOM_PORT:YOUR_CUSTOM_PORT` and also update the BASEROW_PUBLIC_URLS to include
|
||||
`-p YOUR_CUSTOM_PORT:80` and also update the BASEROW_PUBLIC_URL to include
|
||||
the port at the end.
|
||||
|
||||
> Please note that ports 3000, 5432, 1085 and
|
||||
> 8000 are already bound to within the Docker container and so you should pick a different
|
||||
> port for YOUR_CUSTOM_PORT. This is because the embedded Caddy reverse proxy listens
|
||||
> for connections at $BASEROW_PUBLIC_URLS, and so by adding a port onto this you will
|
||||
> for connections at $BASEROW_PUBLIC_URL, and so by adding a port onto this you will
|
||||
> also make Caddy inside the container listen on that port.
|
||||
|
||||
```bash
|
||||
docker run \
|
||||
-e BASEROW_PUBLIC_URLS=https://YOUR_IP_OR_DOMAIN_HERE:YOUR_CUSTOM_PORT \
|
||||
-e BASEROW_PUBLIC_URL=https://YOUR_IP_OR_DOMAIN_HERE:YOUR_CUSTOM_PORT \
|
||||
-e WEB_FRONTEND_PORT=YOUR_CUSTOM_PORT \
|
||||
-p YOUR_CUSTOM_PORT:YOUR_CUSTOM_PORT \
|
||||
-p YOUR_CUSTOM_PORT:80 \
|
||||
# ... followed by the rest of your normal baserow docker arguments
|
||||
```
|
||||
|
||||
|
||||
## Fixing a Docker-Compose Install
|
||||
|
||||
Ensure you have set the environment variable `BASEROW_PUBLIC_URLS` to the URL you are
|
||||
Ensure you have set the environment variable `BASEROW_PUBLIC_URL` to the URL you are
|
||||
using the access Baserow on. See the
|
||||
[Install with docker compose](../installation/install-with-docker-compose.md) guide
|
||||
to see the various ways you can set this variable using docker compose.
|
||||
@@ -78,7 +91,19 @@ variables and arguments that are explained in the guide above.
|
||||
If you are accessing your Baserow server using a domain name then you should launch
|
||||
Baserow like so
|
||||
```bash
|
||||
BASEROW_PUBLIC_URLS=https://YOUR_DOMAIN_HERE docker-compose up -d
|
||||
BASEROW_PUBLIC_URL=https://YOUR_DOMAIN_HERE docker-compose up -d
|
||||
```
|
||||
|
||||
### Access via a domain name with automatic HTTPS
|
||||
|
||||
If you are accessing your Baserow server using a domain name and you want the Baserow
|
||||
Caddy server to automatically handle HTTPS for you then launch Baserow like so. If
|
||||
you still want to be able to access your Baserow from http://localhost add
|
||||
`,http://localhost` onto the BASEROW_CADDY_ADDRESSES.
|
||||
```bash
|
||||
BASEROW_PUBLIC_URL=https://YOUR_DOMAIN_HERE \
|
||||
BASEROW_CADDY_ADDRESSES=https://YOUR_DOMAIN_HERE \
|
||||
docker-compose up -d
|
||||
```
|
||||
|
||||
### Accessing via an IP address
|
||||
@@ -86,7 +111,7 @@ BASEROW_PUBLIC_URLS=https://YOUR_DOMAIN_HERE docker-compose up -d
|
||||
If you are accessing your Baserow server using an IP address then you should launch
|
||||
Baserow like so:
|
||||
```bash
|
||||
BASEROW_PUBLIC_URLS=https://YOUR_IP_HERE docker-compose up -d
|
||||
BASEROW_PUBLIC_URL=https://YOUR_IP_HERE docker-compose up -d
|
||||
```
|
||||
|
||||
### Accessing using a non-standard port
|
||||
@@ -95,7 +120,7 @@ If you have or want to access Baserow using a different port other than 80 and
|
||||
then you also need to set the environment variable `WEB_FRONTEND_PORT`.
|
||||
|
||||
```bash
|
||||
BASEROW_PUBLIC_URLS=https://YOUR_IP_OR_DOMAIN_HERE:YOUR_CUSTOM_PORT \
|
||||
BASEROW_PUBLIC_URL=https://YOUR_IP_OR_DOMAIN_HERE:YOUR_CUSTOM_PORT \
|
||||
WEB_FRONTEND_PORT=YOUR_CUSTOM_PORT \
|
||||
docker-compose up -d
|
||||
```
|
||||
@@ -105,7 +130,7 @@ docker-compose up -d
|
||||
Baserow also provides the `baserow/backend` and `baserow/web-frontend` images for users
|
||||
who want to host and co-ordinate the various Baserow services themselves. Using
|
||||
these images you instead need to set the following environment variables on all
|
||||
containers running these images. Please note that the `BASEROW_PUBLIC_URLS` environment
|
||||
containers running these images. Please note that the `BASEROW_PUBLIC_URL` environment
|
||||
variable is not used by these standalone images.
|
||||
|
||||
* `PUBLIC_BACKEND_URL` (default `http://localhost:8000`): The publicly accessible URL of
|
||||
|
||||
+3
-11
@@ -1,4 +1,4 @@
|
||||
ARG FROM_IMAGE=baserow/baserow:1.8.2
|
||||
ARG FROM_IMAGE=baserow/baserow:1.8.3
|
||||
# This is pinned as version pinning is done by the CI setting FROM_IMAGE.
|
||||
# hadolint ignore=DL3006
|
||||
FROM $FROM_IMAGE as image_base
|
||||
@@ -6,19 +6,11 @@ FROM $FROM_IMAGE as image_base
|
||||
RUN apt-get remove -y postgresql postgresql-contrib redis-server
|
||||
|
||||
ENV DATA_DIR=/baserow/data
|
||||
ENV DATA_DIR_ALREADY_SETUP=yes
|
||||
ENV DOCKER_USER=www-data
|
||||
# We have to build the data dir in the docker image as Caddy does not allow it in their
|
||||
# runtime filesystem. We chown to their www-data user's uid and gid at the end.
|
||||
RUN mkdir -p "$DATA_DIR" && \
|
||||
mkdir -p "$DATA_DIR"/caddy && \
|
||||
mkdir -p "$DATA_DIR"/media && \
|
||||
mkdir -p "$DATA_DIR"/env && \
|
||||
mkdir -p "$DATA_DIR"/backups && \
|
||||
chown -R 33:33 "$DATA_DIR"
|
||||
chown -R 9999:9999 "$DATA_DIR"
|
||||
|
||||
COPY deploy/heroku/heroku_env.sh /baserow/supervisor/env/heroku_env.sh
|
||||
|
||||
# Reset Entrypoint due to a bug in heroku, always attaching `/bin/sh -c` to the command
|
||||
# that's run. This causes the end-command to be `/bin/sh -c ...` - which doesn't work.
|
||||
ENTRYPOINT /bin/bash
|
||||
CMD ["start"]
|
||||
@@ -3,7 +3,3 @@ build:
|
||||
web: heroku.Dockerfile
|
||||
config:
|
||||
FROM_IMAGE: registry.gitlab.com/bramw/baserow/testing/baserow:develop-latest
|
||||
run:
|
||||
web: /baserow.sh start
|
||||
|
||||
|
||||
@@ -125,7 +125,7 @@ export default {
|
||||
`Cannot connect to the backend at ${publicBackendUrlWithProto}.` +
|
||||
` You visited Baserow at ${browserWindowUrl} ` +
|
||||
' which indicates you have mis-configured the Baserow ' +
|
||||
' BASEROW_PUBLIC_URLS or PUBLIC_BACKEND_URL environment variables. ' +
|
||||
' BASEROW_PUBLIC_URL or PUBLIC_BACKEND_URL environment variables. ' +
|
||||
' Please visit https://baserow.io/docs/debugging-connection-issues ' +
|
||||
' on how to fix this error.'
|
||||
)
|
||||
|
||||
@@ -32,18 +32,10 @@ export default function CoreModule(options) {
|
||||
// Register new alias to the web-frontend directory.
|
||||
this.options.alias['@baserow'] = path.resolve(__dirname, '../../')
|
||||
|
||||
const BASEROW_PUBLIC_URLS = process.env.BASEROW_PUBLIC_URLS
|
||||
if (BASEROW_PUBLIC_URLS) {
|
||||
const splitPublicUrls = BASEROW_PUBLIC_URLS.trim().split(',')
|
||||
if (splitPublicUrls.length === 0) {
|
||||
throw new Error(
|
||||
'If BASEROW_PUBLIC_URLS is provided it must be a comma' +
|
||||
' separated list of urls, ports or hostnames, instead it was empty.'
|
||||
)
|
||||
}
|
||||
const trimmedFirstPublicUrl = splitPublicUrls[0].trim()
|
||||
process.env.PUBLIC_BACKEND_URL = trimmedFirstPublicUrl
|
||||
process.env.PUBLIC_WEB_FRONTEND_URL = trimmedFirstPublicUrl
|
||||
const BASEROW_PUBLIC_URL = process.env.BASEROW_PUBLIC_URL
|
||||
if (BASEROW_PUBLIC_URL) {
|
||||
process.env.PUBLIC_BACKEND_URL = BASEROW_PUBLIC_URL
|
||||
process.env.PUBLIC_WEB_FRONTEND_URL = BASEROW_PUBLIC_URL
|
||||
}
|
||||
|
||||
// The core depends on these modules.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "baserow",
|
||||
"version": "1.8.2",
|
||||
"version": "1.8.3",
|
||||
"private": true,
|
||||
"description": "Baserow: open source no-code database web frontend.",
|
||||
"author": "Bram Wiepjes (Baserow)",
|
||||
|
||||
Reference in new issue
Block a user