Self-Hosted
Hosting AgentifyMe Workers on Docker
Execute AgentifyMe workflows on Docker.
This guide provides instructions for deploying AgentifyMe workers using Docker containers. Docker offers a convenient and consistent way to package and run AgentifyMe workers on your own infrastructure.
Prerequisites
Before you begin, ensure you have the following prerequisites:
- Docker installed on your machine, install Docker
- An AgentifyMe account, sign up for free
- Your organization ID, find your organization ID
- An AgentifyMe API key, create an API key
- A host machine to run the workers, this can be a cloud VM or server running Linux or MacOS with access to the internet.
Docker Setup
You can run the workers in a Docker container directly or use docker compose. The docker image is available on Github Container Registry - ghcr.io/agentifyme/worker.
Docker
To run the AgentifyMe worker using Docker, follow these steps:
-
Pull the latest AgentifyMe worker image:
docker pull ghcr.io/agentifyme/worker:latest
-
Run the Docker container with the necessary environment variables:
docker run -d \ --name agentifyme-worker \ -e AGENTIFYME_ORGANIZATION_ID=<your-organization-id> \ -e AGENTIFYME_API_KEY=<your-api-key> \ ghcr.io/agentifyme/worker:latest
Replace <your-organization-id> and <your-api-key> with your actual AgentifyMe organization ID and API key.
-
Verify that the container is running:
docker ps
You should see the agentifyme-worker container in the list of running containers.
-
View the worker logs:
docker logs agentifyme-worker
This will display the logs from the worker, which can be useful for troubleshooting or monitoring.
-
To stop the worker:
docker stop agentifyme-worker
-
To remove the container:
docker rm agentifyme-worker
Remember to keep your API key secure and never share it publicly. If you need to update the worker, simply pull the latest image and restart the container with the same environment variables.
Docker Compose
To run the AgentifyMe worker using Docker Compose, follow these steps:
-
Create a new file named docker-compose.yml and add the following content:
version: '3.8' services: agentifyme-worker: image: ghcr.io/agentifyme/worker:latest environment: - AGENTIFYME_ORGANIZATION_ID=<your-organization-id> - AGENTIFYME_API_KEY=<your-api-key> restart: always
Replace <your-organization-id> and <your-api-key> with your actual AgentifyMe organization ID and API key.
-
Start the Docker Compose service:
docker-compose up -d
-
Verify that the container is running:
docker ps
You should see the agentifyme-worker container in the list of running containers.
-
View the worker logs:
docker logs agentifyme-worker
This will display the logs from the worker, which can be useful for troubleshooting or monitoring.
-
To stop the worker:
docker-compose down
-
To remove the container:
docker rm agentifyme-worker