Skip to content

An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.

2.4 KB
Raw Blame
# documentation: https://autobase.tech/docs/
# slogan: Autobase for PostgreSQL® is an open-source alternative to cloud-managed databases (self-hosted DBaaS).
# category: database
# tags: database, postgres, automation, self-hosted, dbaas
# logo: svgs/autobase.svg
# port: 80

services:
  autobase:
    image: autobase/console_ui:2.11.0
    platform: linux/amd64
    environment:
      - SERVICE_FQDN_AUTOBASE_80
      - PG_CONSOLE_AUTHORIZATION_TOKEN=${SERVICE_PASSWORD_UI}
      - PG_CONSOLE_API_HOST=autobase-api
      - PG_CONSOLE_DBDESK_STUDIO_HOST=dbdesk-studio
    healthcheck:
      test: [ "CMD", "curl", "http://localhost:80/" ]
      interval: 10s
      timeout: 5s
      retries: 5
    depends_on:
      autobase-api:
        condition: service_healthy

  autobase-db:
    image: autobase/console_db:2.11.0
    platform: linux/amd64
    environment:
      - POSTGRES_PASSWORD=${SERVICE_PASSWORD_POSTGRES}
    volumes:
      - autobase-db-data:/var/lib/postgresql
    healthcheck:
      test: ["CMD-SHELL", "pg_isready -U postgres"]
      interval: 5s
      timeout: 5s
      retries: 10

  autobase-api:
    image: autobase/console_api:2.11.0
    platform: linux/amd64
    environment:
      - PG_CONSOLE_DB_HOST=autobase-db
      - PG_CONSOLE_DB_PASSWORD=${SERVICE_PASSWORD_POSTGRES}
      - PG_CONSOLE_AUTHORIZATION_TOKEN=${SERVICE_PASSWORD_UI}
      - PG_CONSOLE_ENCRYPTIONKEY=${SERVICE_BASE64_ENCRYPTIONKEY}
      - PG_CONSOLE_LOGGER_LEVEL=${PG_CONSOLE_LOGGER_LEVEL:-info}
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
      - /tmp/ansible:/tmp/ansible
    healthcheck:
      test: ["CMD", "curl", "-fsS",
            "-H", "accept: application/json",
            "-H", "Authorization: Bearer ${SERVICE_PASSWORD_UI}",
            "http://localhost:8080/api/v1/version"]
      interval: 10s
      timeout: 5s
      retries: 5
    depends_on:
      autobase-db:
        condition: service_healthy

  dbdesk-studio:
    image: docker.io/bhavikagarwal2001/dbdesk-studio:0.1.5
    container_name: dbdesk-studio
    environment:
      - PORT=6789
      - CORS_ORIGIN=${CORS_ORIGIN:-*}
      - NODE_ENV=production
      - DEFAULT_SSL_MODE=require
      - STORAGE_PATH=/opt/dbdesk-studio/data
    volumes:
      - dbdesk_studio_data:/opt/dbdesk-studio
    healthcheck:
      test: ["CMD", "curl", "-fsS", "http://localhost:6789/health"]
      interval: 10s
      timeout: 5s
      retries: 5
    depends_on:
      autobase-api:
        condition: service_healthy