Skip to content

Commit

Permalink
chore: Add self-host docker file (#169)
Browse files Browse the repository at this point in the history
  • Loading branch information
johnjcsmith authored Nov 30, 2024
1 parent 05b68a6 commit 9c639bc
Show file tree
Hide file tree
Showing 4 changed files with 97 additions and 25 deletions.
2 changes: 1 addition & 1 deletion control-plane/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ To run the control plane locally for development:

1. Start the local resources required for development:
```bash
docker compose -f docker-compose.dev.yml up
docker compose up
```

This will start:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
version: '3.9'

services:
postgres:
image: pgvector/pgvector:pg16
Expand All @@ -8,41 +6,19 @@ services:
POSTGRES_USER: inferable
POSTGRES_PASSWORD: inferable
POSTGRES_DB: inferable
ports:
- "5432:5432"
volumes:
- pgdata:/var/lib/postgresql/data

redis:
image: redis
container_name: redis
ports:
- "6379:6379"

elasticmq:
image: softwaremill/elasticmq-native
container_name: elasticmq
ports:
- "9324:9324"
- "9325:9325"
configs:
- source: elasticmq_conf
target: /opt/elasticmq.conf
volumes:
- elasticmqdata:/data

volumes:
pgdata:
elasticmqdata:

configs:
elasticmq_conf:
content: |
include classpath("application.conf")
queues {
run-process {}
run-generate-name {}
customer-telemetry {}
external-tool-call {}
}
58 changes: 58 additions & 0 deletions control-plane/docker-compose.hobby.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
services:
control-plane:
image: inferable/control-plane:latest
container_name: control-plane
depends_on:
- postgres
- redis
- elasticmq
ports:
- "4000:4000"
environment:
DATABASE_URL: "postgresql://inferable:inferable@postgres:5432/inferable"
DATABASE_SSL_DISABLED: "true"
REDIS_URL: "redis://redis:6379"
# Required for elasticmq
AWS_REGION: "us-east-1"
AWS_ACCESS_KEY_ID: "PLACEHOLDER"
AWS_SECRET_ACCESS_KEY: "PLACEHOLDER"
SQS_BASE_QUEUE_URL: 'http://elasticmq:9324/000000000000'
SQS_RUN_PROCESS_QUEUE_URL: 'http://elasticmq:9324/000000000000/run-process'
SQS_RUN_GENERATE_NAME_QUEUE_URL: 'http://elasticmq:9324/000000000000/run-generate-name'
SQS_CUSTOMER_TELEMETRY_QUEUE_URL: 'http://elasticmq:9324/000000000000/customer-telemetry'
SQS_EXTERNAL_TOOL_CALL_QUEUE_URL: 'http://elasticmq:9324/000000000000/external-tool-call'
MANAGEMENT_API_SECRET: ${MANAGEMENT_API_SECRET}
ANTHROPIC_API_KEY: ${ANTHROPIC_API_KEY}
COHERE_API_KEY: ${COHERE_API_KEY}


postgres:
extends:
file: docker-compose.base.yml
service: postgres

redis:
extends:
file: docker-compose.base.yml
service: redis

elasticmq:
extends:
file: docker-compose.base.yml
service: elasticmq

volumes:
pgdata:
elasticmqdata:

configs:
elasticmq_conf:
content: |
include classpath("application.conf")
queues {
run-process {}
run-generate-name {}
customer-telemetry {}
external-tool-call {}
}
38 changes: 38 additions & 0 deletions control-plane/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
services:
postgres:
extends:
file: docker-compose.base.yml
service: postgres
ports:
- "5432:5432"

redis:
extends:
file: docker-compose.base.yml
service: redis
ports:
- "6379:6379"

elasticmq:
extends:
file: docker-compose.base.yml
service: elasticmq
ports:
- "9324:9324"
- "9325:9325"

volumes:
pgdata:
elasticmqdata:

configs:
elasticmq_conf:
content: |
include classpath("application.conf")
queues {
run-process {}
run-generate-name {}
customer-telemetry {}
external-tool-call {}
}

0 comments on commit 9c639bc

Please sign in to comment.