Deploying Baserow with Traefik Labels and Using It Under a DNS Entry
Lewin Grunenberg 3 Minuten Lesezeit

Deploying Baserow with Traefik Labels and Using It Under a DNS Entry

Learn how to deploy Baserow using Docker Compose and Traefik, and access it via a DNS entry.
baserow traefik docker on-premise self-hosted

Introduction

Baserow and Traefik - Database Management and Network Configuration

In this post, we will show you how to deploy Baserow using Docker Compose and Traefik and make it accessible via a DNS entry like https://data.your-domain.org. This configuration allows for a simple and secure deployment of your low-code database platform.

Introduction to Traefik

Traefik is a powerful reverse proxy and load balancer that simplifies the management and deployment of microservices. It enables automatic service discovery and SSL/TLS certificate management. For more details and a comprehensive tutorial, check out our Traefik Tutorial.

Introduction to Baserow

Baserow is an open-source platform for managing databases in a no-code environment. It offers a user-friendly interface that allows you to create and manage tables without needing programming skills. Baserow is ideal for small and medium-sized businesses looking for a flexible and extensible database solution.

Introduction to Docker and Docker Compose

Docker allows applications to run in isolated containers, significantly simplifying their deployment and scaling. Docker Compose is a tool that lets you define and start multi-container applications. It helps manage complex application environments with just a few commands.

Presentation of Docker Compose for Baserow

Baserow

The Baserow service provides the no-code database platform and is made accessible via Traefik:


services:
  baserow:
    container_name: baserow
    image: baserow/baserow:1.24.2
    environment:
      BASEROW_PUBLIC_URL: 'http://localhost'
    ports:
      - "80:80"
      - "443:443"
    volumes:
      - baserow_data:/baserow/data
    labels:
      - "traefik.enable=true"
      - "traefik.http.routers.baserow.rule=Host(`data.your-domain.org`)"  # Replace 'your-domain.org' with your actual domain
      - "traefik.http.routers.baserow.entrypoints=websecure"
      - "traefik.http.routers.baserow.tls.certresolver=lets-encrypt"
      - "traefik.http.services.baserow.loadbalancer.server.port=80"
      - "traefik.docker.network=web"
    networks:
      - web

This section defines the Baserow service, which listens on ports 80 and 443. The configuration includes security options and data volume locations. The environment variables configure the public URL for accessing Baserow.

Traefik

The Traefik labels are crucial for correctly configuring the service and routing traffic accordingly:

  • traefik.enable=true: Activates Traefik for this service, allowing Traefik to monitor the service and forward requests.
  • traefik.http.routers.baserow.rule=Host('data.your-domain.org'): Defines the URL mapping condition, specifying that requests to data.your-domain.org are forwarded to the Baserow service.
  • traefik.http.routers.baserow.entrypoints=websecure: Instructs Traefik to provide this service via the websecure entry point, used for HTTPS traffic.
  • traefik.http.routers.baserow.tls.certresolver=lets-encrypt: Indicates that Traefik uses Let’s Encrypt to secure HTTPS traffic.
  • traefik.http.services.baserow.loadbalancer.server.port=80: Specifies the internal port of the Baserow service to which Traefik forwards traffic.
  • traefik.docker.network=web: Specifies the Docker network used by Traefik to manage connections.

Networks

The network settings define the network that Traefik uses to connect services:


networks:
  web:
    external: true  # Uses an external network managed by Traefik

This section defines the network used by Traefik to connect the various services and manage connections.

Conclusion

With this guide, you can efficiently and securely deploy Baserow with Traefik and Docker. The configuration is flexible and can be easily adapted to individual requirements. For further questions or professional support, check out our Discord Channel. We are happy to assist you with the optimal setup and management of your applications.

Complete Docker Compose

Here is the complete docker-compose.yml file for the Baserow installation:


version: "3.4"

services:
  baserow:
    container_name: baserow
    image: baserow/baserow:1.24.2
    environment:
      BASEROW_PUBLIC_URL: 'http://localhost'
    ports:
      - "80:80"
      - "443:443"
    volumes:
      - baserow_data:/baserow/data
    labels:
      - "traefik.enable=true"
      - "traefik.http.routers.baserow.rule=Host(`data.your-domain.org`)"  # Replace 'your-domain.org' with your actual domain
      - "traefik.http.routers.baserow.entrypoints=websecure"
      - "traefik.http.routers.baserow.tls.certresolver=lets-encrypt"
      - "traefik.http.services.baserow.loadbalancer.server.port=80"
      - "traefik.docker.network=web"
    networks:
      - web

networks:
  web:
    external: true  # Uses an external network managed by Traefik

volumes:
  baserow_data:

Ähnliche Artikel