Skip to content

Repository files navigation

Port Detection Service

A Celery worker that processes port detection tasks from a RabbitMQ queue and stores results in Redis.

Requirements

  • Python 3.13+
  • uv (Python package/dependency manager)
  • RabbitMQ (message broker)
  • Redis (result backend)

Installation

Clone the repository and install dependencies:

git clone https://github.com/TraceX-Project/port-detection-service.git
cd port-detection-service
uv sync

Configuration

Copy .env.example to .env and fill in the values:

cp .env.example .env
RABBITMQ_HOST=
RABBITMQ_PORT=
RABBITMQ_USER=
RABBITMQ_PASSWORD=
REDIS_ADDRESS=
REDIS_PORT=
REDIS_DB=
REDIS_PASSWORD=

Running the Service

Development mode

uv run celery -A workers.celery.celery_app worker --loglevel=info

Production mode (Docker)

docker compose -f docker-compose.prod.yaml up -d --build

Project Structure

.
├── config
│   └── setting.py       # Environment configuration
├── workers
│   ├── celery.py        # Celery app setup
│   └── tasks.py         # Port detection task
├── Dockerfile
├── pyproject.toml
└── uv.lock

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages