From 89b2cb2e8db7158c2a97eb595458f1d9f9b22e54 Mon Sep 17 00:00:00 2001 From: Ammar Hussein Date: Mon, 16 Sep 2024 18:24:52 -0700 Subject: [PATCH] got baserow up and running --- .env.sample | 2 ++ README.md | 2 +- compose.yml | 54 ++++++++++++++++++++++++++++++++++++++++++----------- 3 files changed, 46 insertions(+), 12 deletions(-) diff --git a/.env.sample b/.env.sample index 3f0e2bf..9b5f91a 100644 --- a/.env.sample +++ b/.env.sample @@ -6,3 +6,5 @@ DOMAIN=baserow.example.com #EXTRA_DOMAINS=', `www.baserow.example.com`' LETS_ENCRYPT_ENV=production + +DB_PASSWORD_VERSION=v1 \ No newline at end of file diff --git a/README.md b/README.md index 6ad9df2..7265042 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # baserow -> One line description of the recipe +> Open platform to create scalable databases and applications without coding. diff --git a/compose.yml b/compose.yml index a2c3805..9e7d930 100644 --- a/compose.yml +++ b/compose.yml @@ -3,9 +3,20 @@ version: "3.8" services: app: - image: nginx:1.20.0 + image: baserow/baserow:1.27.2 + depends_on: + - db + volumes: + - baserow_data:/baserow/data + environment: + - BASEROW_PUBLIC_URL=https://${DOMAIN} + - DATABASE_HOST=db + - DATABASE_NAME=postgres + - DATABASE_USER=postgres + - DATABASE_PASSWORD_FILE=/run/secrets/db_password networks: - proxy + - internal deploy: restart_policy: condition: on-failure @@ -15,18 +26,39 @@ services: - "traefik.http.routers.${STACK_NAME}.rule=Host(`${DOMAIN}`${EXTRA_DOMAINS})" - "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}" + - "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=" - healthcheck: - test: ["CMD", "curl", "-f", "http://localhost"] - interval: 30s - timeout: 10s - retries: 10 - start_period: 1m + secrets: + - db_password + + db: + image: postgres:15 + volumes: + - postgress_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 + secrets: + - db_password networks: proxy: external: true + internal: + +secrets: + db_password: + external: true + name: ${STACK_NAME}_db_password_${DB_PASSWORD_VERSION} + +volumes: + baserow_data: + postgress_data: