Squadbase
Squadbase Docs

Docker

Learn how to deploy with Docker.

Squadbase supports Docker-based deployment. By packaging your application and its dependencies together, Docker guarantees identical behavior across environments and minimizes the gap between local and production.

With Docker, Squadbase gives you all of the following out of the box:

  • Deployment to a secure cloud environment
  • Built-in user authentication
  • User analytics
  • Log monitoring
  • Feedback collection from users

Docker is also the best option when you need to deploy apps built with non-officially supported frameworks or apps that install OS-level packages.

Create a Dockerfile

Write a Dockerfile to package your app. Squadbase builds the image and uses it for deployment.

The runtime environment depends on the provider you set in squadbase.yml:

  • AWS – An environment based on AWS Lambda
  • GCP – An environment based on Google Cloud Run

Below are the Dockerfiles used for the officially supported frameworks.

Deploy with GitHub integration

Create squadbase.yml

Add squadbase.yml to the root of your codebase. For example, deploying a Streamlit app with Docker might look like this:

app.py
Dockerfile
pyproject.toml
squadbase.yml

The simplest possible squadbase.yml is:

# squadbase.yml
version: '1'
 
build:
  context: .

See the reference for customization options.

Import the GitHub repository into Squadbase

From the dashboard home, import your GitHub repository. Deployment starts automatically after the import completes.

Push and deploy

Make changes, push to GitHub, and a new deployment starts automatically.

Use Squadbase features

Beyond deployment, Squadbase provides powerful features for developing and operating internal apps.

User authentication & member management

When someone on your Squadbase team opens an app, authentication happens automatically. If the app is not public, only authenticated users can access it. Each user can also be assigned a project role.

Use the REST API to fetch user information—including roles—and adapt your app’s behavior.

import requests
 
def get_user_info_from_cookie(cookie):
    subdomain = "your-subdomain"
    url = f"https://{subdomain}.squadbase.app/_sqcore/auth"
 
    token = cookie.get("__Host-squadbase-session")
    headers = {"Authorization": f"Bearer {token}"}
 
    response = requests.post(url, headers=headers)
    if response.status_code == 200:
        return response.json()
    return {"error": "Failed to retrieve user information"}
 
cookie = {"__Host-squadbase-session": "your-auth-token"}
user_info = get_user_info_from_cookie(cookie)
print(user_info)

User analytics

Squadbase collects access logs and surfaces user analytics automatically—no extra code required.

User Analytics

Log monitoring

View runtime and access logs for each deployment and each version, right from the dashboard.

Log Monitoring

Feedback

Every deployed app includes a feedback comment box so team members can send feedback directly.

Feedback

On this page