Compare commits

..

28 Commits

Author SHA1 Message Date
linnealovespie a866918e92 add backup labels 2025-11-03 19:26:40 -08:00
linnealovespie 26cd26d509 uncomment 2025-10-30 20:15:49 -07:00
linnealovespie 25ed229656 uncomment 2025-10-30 20:14:57 -07:00
linnealovespie d17155f799 update secret version 2025-10-30 20:13:24 -07:00
linnealovespie 68bfb287e1 try to add db service 2025-10-30 19:49:29 -07:00
marlon e85291cdb6 chore: publish 1.2.0+1.35.3 release 2025-10-22 10:50:26 -04:00
marlon e61e4d9e13 add backup support 2025-10-22 10:46:40 -04:00
marlon 43c7fb2130 chore: publish 1.1.0+1.31.1 release 2025-07-17 13:49:00 -04:00
marlon 48f7153a9b Merge pull request 'add config options for running with low resources' (#4) from low-resource into main
Reviewed-on: coop-cloud/baserow#4
2025-07-17 17:44:57 +00:00
marlon d6f980ef48 add low resources config options 2025-07-17 13:38:12 -04:00
marlon a8ae828568 chore: publish 1.0.0+1.31.1 release 2025-05-08 23:31:55 -04:00
marlon 0b930dd81d Merge pull request 'shorter jwt secret name' (#3) from shorter-secret into main
Reviewed-on: coop-cloud/baserow#3
Reviewed-by: decentral1se <decentral1se@noreply.git.coopcloud.tech>
2025-05-09 03:28:29 +00:00
marlon ccba29e3e4 shorter jwt secret name 2025-05-07 13:34:24 -04:00
3wordchant 53ae1dc377 Fix tag build URL 2025-03-05 12:16:15 -05:00
3wordchant 9d28e3695a chore: publish 0.7.0+1.31.1 release 2025-03-05 12:12:48 -05:00
knoflook 7fd09f34a5 wip: wildcard domain 2025-01-30 11:31:03 +01:00
knoflook 1cc375cf19 chore: publish 0.6.0+1.30.1 release 2025-01-30 02:04:59 +01:00
trav 0591e1bf1c chore: publish 0.5.0+1.29.0 release 2024-11-13 12:43:21 -05:00
trav 016e7b6848 chore: publish 0.4.0+1.28.0 release 2024-10-15 17:30:35 -04:00
trav 658be3c520 Update README.md
healthchecks yes
2024-10-14 15:01:41 +00:00
trav 3287bfc479 chore: publish 0.3.1+1.25.2 release 2024-10-14 10:59:03 -04:00
trav 261493929e Fix healthcheck 2024-10-14 10:57:07 -04:00
knoflook 736acbf014 fix: remove broken healthcheck 2024-08-29 17:18:08 +02:00
3wordchant 3564202372 chore: publish 0.3.0+1.25.2 release 2024-07-02 21:18:47 -04:00
3wordchant 15817b421d Update baserow image to 1.25.2 2024-07-02 21:16:23 -04:00
3wordchant b1fd18de3f chore: publish 0.2.0+1.21.2 release 2024-03-25 15:04:54 -03:00
cas 63b2fda7d3 Fix extra compose woops 2024-03-22 17:53:29 -07:00
cas da39891d71 Add secrets and email support 2024-03-22 16:55:14 -07:00
10 changed files with 164 additions and 7 deletions
+1 -1
View File
@@ -32,7 +32,7 @@ steps:
from_secret: drone_abra-bot_token
fork: true
repositories:
- coop-cloud/auto-recipes-catalogue-json
- toolshed/auto-recipes-catalogue-json
trigger:
event: tag
+24
View File
@@ -2,7 +2,31 @@ TYPE=baserow
DOMAIN=baserow.example.com
COMPOSE_FILE="compose.yml"
## Domain aliases
#EXTRA_DOMAINS=', `www.baserow.example.com`'
## Automatically use subdomains under following domain (anything.example.com)
#WILDCARD_DOMAIN='example.com'
LETS_ENCRYPT_ENV=production
## For low-resource machines (<2GB ram)
# BASEROW_AMOUNT_OF_GUNICORN_WORKERS=1
# BASEROW_AMOUNT_OF_WORKERS=1
# BASEROW_RUN_MINIMAL=yes
# COMPOSE_FILE="$COMPOSE_FILE:compose.email.yml"
# FROM_EMAIL="No Reply <noreply@example.com>"
# EMAIL_SMTP_USE_TLS=true
# EMAIL_SMTP_HOST=mail.exampl.com
# EMAIL_SMTP_PORT=497
# EMAIL_SMTP_USER=noreply@example.com
# SECRET_EMAIL_SMTP_PASSWORD_VERSION=v1
#
SECRET_SECRET_KEY_VERSION=v1
SECRET_JWT_KEY_VERSION=v1
SECRET_DB_PASSWORD_VERSION=v1
+7 -1
View File
@@ -7,7 +7,7 @@
* **Category**: Apps
* **Status**: 0
* **Image**: [`baserow`](https://hub.docker.com/r/baserow), 4, upstream
* **Healthcheck**: No
* **Healthcheck**: Yes (using https://baserow.io/docs/installation%2Finstall-with-docker#running-healthchecks-on-baserow)
* **Backups**: No
* **Email**: No
* **Tests**: No
@@ -21,5 +21,11 @@
* `abra app config <app-name>`
* `abra app deploy <app-name>`
## Resources
* Baserow requires over 2GB RAM to run on Co-op Cloud with default settings
* For environments with 2GB or less RAM, run `abra app config <app-name>` and uncomment the `For low-resource machines` config block
* More info: https://hub.docker.com/r/baserow/baserow/#scaling-options
For more, see [`docs.coopcloud.tech`](https://docs.coopcloud.tech).
+1
View File
@@ -0,0 +1 @@
export PG_BACKUP_VERSION=v1
+21
View File
@@ -0,0 +1,21 @@
---
version: "3.8"
services:
app:
environment:
- EMAIL_SMTP=true
- EMAIL_SMTP_PASSWORD_FILE=/run/secrets/email_smtp_password
- FROM_EMAIL
- EMAIL_SMTP_USE_TLS
- EMAIL_SMTP_HOST
- EMAIL_SMTP_PORT
- EMAIL_SMTP_USER
secrets:
- email_smtp_password
secrets:
email_smtp_password:
external: true
name: ${STACK_NAME}_email_smtp_password_${SECRET_EMAIL_SMTP_PASSWORD_VERSION}
+67 -5
View File
@@ -3,38 +3,100 @@ version: "3.8"
services:
app:
image: baserow/baserow:1.21.2
image: baserow/baserow:1.35.3
depends_on:
- db
networks:
- proxy
- internal
environment:
- BASEROW_PUBLIC_URL=https://${DOMAIN}
- SECRET_KEY_FILE=/run/secrets/secret_key
- BASEROW_JWT_SIGNING_KEY_FILE=/run/secrets/jwt_key
- BASEROW_CADDY_ADDRESSES=:80
- BASEROW_BUILDER_DOMAINS=${WILDCARD_DOMAIN}
- DATABASE_HOST=db
- DATABASE_NAME=postgres
- DATABASE_USER=postgres
- DATABASE_PASSWORD_FILE=/run/secrets/db_password
secrets:
- secret_key
- jwt_key
- db_password
deploy:
restart_policy:
condition: on-failure
labels:
- "traefik.enable=true"
- "traefik.http.services.${STACK_NAME}.loadbalancer.server.port=80"
- "traefik.http.routers.${STACK_NAME}.rule=Host(`${DOMAIN}`${EXTRA_DOMAINS})"
- "traefik.http.routers.${STACK_NAME}.rule=Host(`${DOMAIN}`${EXTRA_DOMAINS}) || HostRegexp(`{subdomain:\\w+}.${WILDCARD_DOMAIN}`)"
- "traefik.http.routers.${STACK_NAME}.entrypoints=web-secure"
- "traefik.http.routers.${STACK_NAME}.tls.certresolver=${LETS_ENCRYPT_ENV}"
## Redirect from EXTRA_DOMAINS to DOMAIN
#- "traefik.http.routers.${STACK_NAME}.middlewares=${STACK_NAME}-redirect"
#- "traefik.http.middlewares.${STACK_NAME}-redirect.headers.SSLForceHost=true"
#- "traefik.http.middlewares.${STACK_NAME}-redirect.headers.SSLHost=${DOMAIN}"
- "coop-cloud.${STACK_NAME}.version=0.1.2+1.21.2"
- "backupbot.backup=true"
- "backupbot.backup.path=/baserow/data"
- "coop-cloud.${STACK_NAME}.version=1.2.0+1.35.3"
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost"]
test: ["CMD", "./baserow.sh", "backend-cmd", "backend-healthcheck"]
interval: 30s
timeout: 10s
retries: 10
start_period: 1m
volumes:
- baserow_data:/baserow/data
db:
image: postgres:15
volumes:
- postgres_data:/var/lib/postgresql/data
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD_FILE=/run/secrets/db_password
- POSTGRES_DB=postgres
networks:
internal:
deploy:
restart_policy:
condition: on-failure
labels:
backupbot.backup.pre-hook: "/pg_backup.sh backup"
backupbot.backup.volumes.postgres.path: "backup.sql"
backupbot.restore.post-hook: '/pg_backup.sh restore'
configs:
- source: pg_backup
target: /pg_backup.sh
mode: 0555
secrets:
- db_password
healthcheck:
test: ["CMD-SHELL", "pg_isready", "-U", "postgres"]
interval: 30s
timeout: 10s
retries: 10
volumes:
baserow_data:
postgres_data:
networks:
proxy:
external: true
internal:
secrets:
secret_key:
external: true
name: ${STACK_NAME}_secret_key_${SECRET_SECRET_KEY_VERSION}
jwt_key:
external: true
name: ${STACK_NAME}_jwt_key_${SECRET_JWT_KEY_VERSION}
db_password:
external: true
name: ${STACK_NAME}_db_password_${SECRET_DB_PASSWORD_VERSION}
configs:
pg_backup:
name: ${STACK_NAME}_pg_backup_${PG_BACKUP_VERSION}
file: pg_backup.sh
+34
View File
@@ -0,0 +1,34 @@
#!/bin/bash
set -e
BACKUP_FILE='/var/lib/postgresql/data/backup.sql'
function backup {
export PGPASSWORD=$(cat /run/secrets/db_password)
pg_dump -U ${POSTGRES_USER} ${POSTGRES_DB} > $BACKUP_FILE
}
function restore {
cd /var/lib/postgresql/data/
restore_config(){
# Restore allowed connections
cat pg_hba.conf.bak > pg_hba.conf
su postgres -c 'pg_ctl reload'
}
# Don't allow any other connections than local
cp pg_hba.conf pg_hba.conf.bak
echo "local all all trust" > pg_hba.conf
su postgres -c 'pg_ctl reload'
trap restore_config EXIT INT TERM
# Recreate Database
psql -U ${POSTGRES_USER} -d postgres -c "DROP DATABASE ${POSTGRES_DB} WITH (FORCE);"
createdb -U ${POSTGRES_USER} ${POSTGRES_DB}
psql -U ${POSTGRES_USER} -d ${POSTGRES_DB} -1 -f $BACKUP_FILE
trap - EXIT INT TERM
restore_config
}
$@
+1
View File
@@ -0,0 +1 @@
Fix compose file
+1
View File
@@ -0,0 +1 @@
WARNING: this version includes a major Postgres upgrade, you need to follow the steps here, ideally BEFORE upgrading: https://baserow.io/docs/installation%2Finstall-with-docker#upgrade-process
+7
View File
@@ -0,0 +1,7 @@
This upgrade changes the name of the jwt signing key secret from baserow_jwt_signing_key to jwt_key
EXISTING DEPLOYMENTS MUST COPY THIS SECRET TO THE NEW LOCATION:
# Retrieve the current jwt key value:
docker exec <your_baserow_container_name> cat /run/secrets/baserow_jwt_signing_key
# Create the new secret
abra app secret insert <your_baserow_domain> jwt_key v1 <value returned by previous command>