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.
Streamlit (pip) on GCP
Streamlit (poetry) on GCP
Streamlit (uv) on GCP
Next.js on AWS
Next.js on GCP
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:
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)
Install @squadbase/server and fetch the current user in one call:
import { createServerClient } from "@squadbase/server";
const client = createServerClient({
projectId: "your-project-id",
cookieOptions: {
getCookie: () => {
// Return the session cookie here
},
// For local development you can set mockUser
// mockUser: {
// username: "test-user",
// email: "test@example.com",
// firstName: "Test",
// lastName: "User",
// iconUrl: null,
// roles: ["user"],
// },
},
});
const user = await client.getUser();
console.log(user);
// {
// username: string,
// email: string,
// firstName: string,
// lastName: string,
// iconUrl: string | null,
// roles: string[]
// }
User analytics
Squadbase collects access logs and surfaces user analytics automatically—no extra code required.
Log monitoring
View runtime and access logs for each deployment and each version, right from the dashboard.
Feedback
Every deployed app includes a feedback comment box so team members can send feedback directly.