diff --git a/docs/mint.json b/docs/mint.json index c9e70ff99f..c7fa2536ef 100644 --- a/docs/mint.json +++ b/docs/mint.json @@ -100,6 +100,7 @@ "group": "Self-host agenta", "pages": [ "self-host/host-locally", + "self-host/migration", { "group": "Deploy Remotely", "pages": [ diff --git a/docs/self-host/migration.mdx b/docs/self-host/migration.mdx new file mode 100644 index 0000000000..41258214a3 --- /dev/null +++ b/docs/self-host/migration.mdx @@ -0,0 +1,50 @@ +--- +title: Migration +description: 'This is a step-by-step guide for upgrading to the latest version of Agenta' +--- + +## Upgrading to the Latest Version + +To upgrade to the latest version of Agenta, execute the following command: + +``` +docker compose -f docker-compose.gh.yml up -d --pull always + +``` + +This command instructs Docker to fetch and use the latest version of the Agenta image. + +## Database Migration with Beanie + +This guide offers detailed steps for performing database migrations in the Agenta backend system, using Beanie, a MongoDB ODM (Object Document Mapper) for Python. You can learn more about Beanie [here](https://github.com/roman-right/beanie). + +### Setting Up Beanie + +To install a custom version of Beanie: + +``` +git clone +cd beanie +pip install . + +``` + +### Migrating from Version 0.7 to 0.8 + +1. **Accessing the Migration Directory**: First, navigate to the migration directory: + + ``` + cd agenta_backend/migrations/17_01_24_pydantic_and_evaluations + + ``` + +2. **Executing the Beanie Migration**: Run the migration script as follows: + + ``` + beanie migrate --no-use-transaction -uri 'mongodb://username:password@localhost' -db 'agenta_v2' -p . + + ``` + + + Make sure to replace `username`, `password`, and other relevant placeholders with your actual credentials, unless you're using default settings. + \ No newline at end of file