1. Prerequisites and dependencies
Before you begin, ensure you have the following installed on your host:- Docker and the Compose plugin.
- PostgreSQL database: AllKnower (the parser backend) uses PostgreSQL to store user sessions, histories, and usage budgets.
- Connect to an existing PostgreSQL instance running on your host machine.
- Use the self-contained compose file below to run PostgreSQL in a container alongside the AllCodex services.
2. Docker Compose configuration
Create a folder for your deployment and configure thedocker-compose.yml file.
Self-contained deployment (includes PostgreSQL)
This configuration includes a PostgreSQL container. The services usenetwork_mode: host to share the host’s network, binding the database to port 5432 on localhost.
docker-compose.yml
3. Creating environment files
AllCodex reads configurations from environment files located in/etc/allcodex/ on your host server. Create the directory and touch the config files:
Core configuration (core.env)
Configure Core to listen on port 8080:
/etc/allcodex/core.env
AllKnower configuration (allknower.env)
Provide database credentials, OpenRouter key, and encryption secrets:
/etc/allcodex/allknower.env
Portal configuration (portal.env)
Configure the Portal to point to the backend services:
/etc/allcodex/portal.env