A Hyrex application with PostgreSQL database running in Docker containers.
- Docker
- Docker Compose
-
Clone the repository and navigate to the project directory
-
Build and start the services:
docker compose up --build
Or run in detached mode:
docker compose up -d --build
-
The application will be available with:
- PostgreSQL database on
u:5432 - Hyrex worker running and connected to the database
- Hyrex Studio UI on
https//local.hyrex.studio
- PostgreSQL database on
The application connects to PostgreSQL using the following default credentials:
- Database:
hyrex_db - User:
hyrex_user - Password:
hyrex_password - Host:
localhost(from host machine) orpostgres(from within Docker network) - Port:
5432
Copy .env.example to .env to customize configuration:
cp .env.example .envdocker compose updocker compose downdocker compose down -vdocker compose logs -fdocker compose logs -f app
docker compose logs -f postgres
docker compose logs -f studiodocker compose buildFor local development without Docker:
-
Create a virtual environment:
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install dependencies:
pip install -r requirements.txt
-
Set up environment variables:
cp .env.example .env # Edit .env with your local database configuration -
Run the Hyrex worker:
hyrex run-worker hyrex_app:app
.
├── Dockerfile # Docker image configuration
├── docker-compose.yml # Docker Compose services configuration
├── hyrex_app.py # Main Hyrex application
├── tasks.py # Task definitions
├── requirements.txt # Python dependencies
├── .env.example # Example environment variables
└── README.md # This file
- Ensure PostgreSQL container is healthy:
docker compose ps - Check logs:
docker compose logs postgres - Verify environment variables in
.envfile
- Check Docker daemon is running
- Review logs:
docker compose logs - Ensure ports 5432 is not already in use
docker compose down -v
docker compose up --build