Steps
Make sure Docker and Docker compose versions are newer. To verify the
versions, run the following commands: For docker
docker --version
and for
docker compose docker compose --version
Step 1: Clone the repository
Clone the repository using the following command:Step 2: Configure environment variables
Repo already has.env
file for common usecases, modify this file to suit your needs.
Authentication Configuration
Langtrace supports multiple authentication methods. Make sure to configure the necessary environment variables for your chosen authentication method(s) in the.env
file. For detailed instructions, refer to our Authentication guide.
Step 3: Start the services
http://localhost:3000
.
if you wish to build the docker image locally and use it, run the
docker compose up
command with the --build
flag.Step 4: Stop the services
To delete containers and volumesBash
-v
flag is used to delete volumes.
Deleting the volumes also wipes out the data stored in postgres and
clickhouse.
Useful Ops Commands
Connecting to postgres db
Connecting to postgres db
To connect to the postgres db, run the following command:
Connecting to clickhouse db
Connecting to clickhouse db
To connect to the clickhouse db, run the following command:
Viewing logs of Langtrace App
Viewing logs of Langtrace App
To view the logs of the Next JS app, run the following command:If you want to follow the logs, run the following command:
Running prisma schema apply command
Running prisma schema apply command
To create tables manually
Troubleshooting
The following are some common issues that you may face while setting up langtrace using docker composeTable not found error OR Column not found errors
Table not found error OR Column not found errors
Its likely that schema is not applied to the database or the schema is not in sync with the database. To fix this, run the following command:
Prisma schema not in sync with database
Prisma schema not in sync with database
If you have made changes to the prisma schema and want to apply the changes to the database, run the following command:
Docker compose failing to setup with `Additional property required is not allowed` errors
Docker compose failing to setup with `Additional property required is not allowed` errors
Its likely that you are using an older version of docker-compose. Update
docker-compose to the latest version. Certain docker compose schema used in
this project are only supported in newer versions of docker-compose. Either
you update the docker compose version OR remove the
depends_on property
that
maybe causing the error.Clickhouse server not starting
Clickhouse server not starting
If clickhouse server is not starting, it is likely that the port
8123
is
already in use. You can change the port in the docker-compose file.