Deploy with Docker

Run Outpost locally using Docker Compose. This setup includes:

  • Outpost services (API, Delivery, and Log)
  • Redis for KV and entity storage
  • PostgreSQL for log storage
  • RabbitMQ or AWS SQS via LocalStack for message queuing

Prerequisites

Setup

  1. Clone the Outpost repository:

    git clone https://github.com/hookdeck/outpost.git
    
  2. Navigate to the Docker Compose examples directory:

    cd outpost/examples/docker-compose/
    
  3. Create a .env file from the example:

    cp .env.example .env
    
  4. Set a value for API_KEY in the .env file.

  5. Start Outpost with your preferred message queue:

    With RabbitMQ:

    docker-compose -f compose.yml -f compose-rabbitmq.yml -f compose-postgres.yml up
    

    With SQS via LocalStack:

    docker-compose -f compose.yml -f compose-awssqs.yml -f compose-postgres.yml up
    

Verify Installation

Set shell variables for convenience:

OUTPOST_URL=http://localhost:3333
TENANT_ID=your_org_name
API_KEY=your_api_key
URL=https://your-webhook-url.example.com/events
  1. Wait for the health check to return OK:

    curl $OUTPOST_URL/api/v1/healthz
    
  2. Create a tenant:

    curl --request PUT "$OUTPOST_URL/api/v1/tenants/$TENANT_ID" \
    --header "Authorization: Bearer $API_KEY"
    
  3. Use a local tunnel or Hookdeck Console to capture webhook events, then create a destination:

    curl "$OUTPOST_URL/api/v1/tenants/$TENANT_ID/destinations" \
    --header "Content-Type: application/json" \
    --header "Authorization: Bearer $API_KEY" \
    --data '{
      "type": "webhook",
      "topics": ["*"],
      "config": { "url": "'"$URL"'" }
    }'
    
  4. Publish an event:

    curl "$OUTPOST_URL/api/v1/publish" \
    --header "Content-Type: application/json" \
    --header "Authorization: Bearer $API_KEY" \
    --data '{
      "tenant_id": "'"$TENANT_ID"'",
      "topic": "user.created",
      "eligible_for_retry": true,
      "data": { "user_id": "usr_001" }
    }'
    
  5. Check your webhook endpoint for the delivered event.

  6. Get a portal link for the tenant:

    curl "$OUTPOST_URL/api/v1/tenants/$TENANT_ID/portal" \
    --header "Authorization: Bearer $API_KEY"
    

    Open the redirect_url from the response to view the tenant portal.

Continue using the API Reference or the portal to add and test more destinations.