Welcome! This guide will help you deploy the Phospho Platform using Docker Compose. Phospho is an advanced backoffice for managing your LLM apps, with tools like clustering, data labeling, and user analytics. This deployment guide is designed to provide easy-to-follow steps, allowing you to set up Phospho locally or on your server.
Propelauth is used for authentication and security.
- Sign Up: Create your Propelauth account
An OpenAI API Key is required for analytics and clustering.
- Get API Key: Register and obtain your OpenAI API Key
MongoDB will serve as a database solution. You can use a local one or MongoDB Atlas, the cloud solution.
- Sign Up: Register for MongoDB
Docker is used to containerize your application, ensuring consistency across different environments.
- Install Docker: official Docker installation guide.
The GCP Natural Language API is used for to detect the language and the sentiment of user messages.
- Get Started with GCP: Google Cloud Platform
Temporal is used as a brocker to manage jobs and long computations.
- Get Started with Temporal: Get started guide
First, clone the repository containing the source code of the platform with
git clone https://github.com/phospho-app/phospho.git
First create in the root folder a file called .env.docker
following this example:
# Application Environment
APP_ENV=local
ENVIRONMENT="test"
# API Configuration
API_VERSION=v0
NEXT_PUBLIC_API_VERSION=v0
NEXT_PUBLIC_API_URL=http://127.0.0.1:8000
LOCAL_API_URL=http://127.0.0.1:8000
NEXT_PUBLIC_LOCAL_API_URL=http://127.0.0.1:8000
# Authentication Settings
NEXT_PUBLIC_AUTH_URL=https://<your_id>.propelauthtest.com
PROPELAUTH_API_KEY=
PROPELAUTH_REDIRECT_URI=http://localhost:3000/api/auth/callback
PROPELAUTH_VERIFIER_KEY=-----BEGIN PUBLIC KEY-----
PROPELAUTH_URL="https://<your_id>.propelauthtest.com"
# GCP Configuration
GCP_PROJECT_ID=""
GCP_SERVICEACCOUNT_EMAIL=
GCP_PRIVATE_KEY=-----BEGIN PRIVATE KEY-----
GCP_JSON_CREDENTIALS_NATURAL_LANGUAGE_PROCESSING=
GCP_JSON_CREDENTIALS_BUCKET=
# OPENAI API Key For Chat and Embedding models
OPENAI_API_KEY=
OPENAI_BASE_URL=
# MongoDB Database Configuration
MONGODB_NAME="test"
MONGODB_URL=""
# Local Development Settings
TEMPORAL_HOST_URL=host.docker.internal:7233
TEMPORAL_NAMESPACE=default
TEMPORAL_MTLS_TLS_CERT_BASE64=
TEMPORAL_MTLS_TLS_KEY_BASE64=
# (OPTIONNAL) Services and Integrations
RESEND_API_KEY=
STRIPE_SECRET_KEY=
STRIPE_WEBHOOK_SECRET=
SENTRY_DSN=
EXTRACTOR_SENTRY_DSN=
SLACK_URL=
AZURE_OPENAI_KEY=
AZURE_OPENAI_ENDPOINT=
TEST_PROPELAUTH_ORG_ID=
TEST_PROPELAUTH_USER_ID=
Make sure to replace the placeholders with your actual credentials. These environment variables are essential for connecting the different components of the Phospho platform.
Please put this .env file in the platform
, ai-hub
and backend
folder
Make sure Temporal is running. Use the Temporal CLI to do so.
temporal server start-dev --db-filename your_temporal.db --ui-port 7999
For production environment, we recommend you use the Cloud version of Temporal. If so, make sure to update the env variables starting with TEMPORAL_
.
docker compose up
Congratulations! You have successfully deployed the Phospho platform with Docker. You can now start exploring the platform and use its powerful tools to manage your LLM apps more effectively.
If you run into any issues, feel free to ask for support to [email protected]