Hosting AgentifyMe Workers 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 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:

  1. Pull the latest AgentifyMe worker image:

    docker pull ghcr.io/agentifyme/worker:latest
  2. 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.

  3. Verify that the container is running:

    docker ps

    You should see the agentifyme-worker container in the list of running containers.

  4. View the worker logs:

    docker logs agentifyme-worker

    This will display the logs from the worker, which can be useful for troubleshooting or monitoring.

  5. To stop the worker:

    docker stop agentifyme-worker
  6. 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:

  1. 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.

  2. Start the Docker Compose service:

    docker-compose up -d
  3. Verify that the container is running:

    docker ps

    You should see the agentifyme-worker container in the list of running containers.

  4. View the worker logs:

    docker logs agentifyme-worker

    This will display the logs from the worker, which can be useful for troubleshooting or monitoring.

  5. To stop the worker:

    docker-compose down
  6. To remove the container:

    docker rm agentifyme-worker
Copyright © 2024 Agentify Inc. All rights reserved