langgraph build
).REDIS_URI
: Connection details to a Redis instance. Redis will be used as a pub-sub broker to enable streaming real time output from background runs. The value of REDIS_URI
must be a valid Redis connection URI.Deployment A
, REDIS_URI
can be set to redis://<hostname_1>:<port>/1
and for Deployment B
, REDIS_URI
can be set to redis://<hostname_1>:<port>/2
.1
and 2
are different database numbers within the same instance, but <hostname_1>
is shared. The same database number cannot be used for separate deployments.DATABASE_URI
: Postgres connection details. Postgres will be used to store assistants, threads, runs, persist thread state and long term memory, and to manage the state of the background task queue with ‘exactly once’ semantics. The value of DATABASE_URI
must be a valid Postgres connection URI.Deployment A
, DATABASE_URI
can be set to postgres://<user>:<password>@/<database_name_1>?host=<hostname_1>
and for Deployment B
, DATABASE_URI
can be set to postgres://<user>:<password>@/<database_name_2>?host=<hostname_1>
.<database_name_1>
and database_name_2
are different databases within the same instance, but <hostname_1>
is shared. The same database cannot be used for separate deployments.LANGSMITH_API_KEY
: LangSmith API key.LANGGRAPH_CLOUD_LICENSE_KEY
: (if using Enterprise) LangGraph Platform license key. This will be used to authenticate ONCE at server start up.LANGSMITH_ENDPOINT
: To send traces to a self-hosted LangSmith instance, set LANGSMITH_ENDPOINT
to the hostname of the self-hosted LangSmith instance.https://beacon.langchain.com
from your network. This is required for license verification and usage reporting if not running in air-gapped mode. See the Egress documentation for more details.docker
command:
my-image
with the name of the image you built in the prerequisite steps (from langgraph build
)REDIS_URI
, DATABASE_URI
, and LANGSMITH_API_KEY
.docker compose up
with this Docker Compose file in the same folder.
This will launch a LangGraph Server on port 8123
(if you want to change this, you can change this by changing the ports in the langgraph-api
volume). You can test if the application is healthy by running: