Files
worker/README.md
AmanDevelops 1abbe6460c feat: initialize worker for website generator with GitHub deployment functionality
- Added package.json for project dependencies and scripts.
- Created redis.ts for Redis connection configuration.
- Set up tsconfig.json for TypeScript compilation settings.
- Implemented worker.ts to handle GitHub repository deployments using BullMQ and Octokit.
2026-01-07 23:55:00 +05:30

1.5 KiB

Worker Setup for Website Generator

Docker Installation

This project requires Docker to be installed on your system.

  1. Install Docker: Follow the official installation guide for your operating system:

  2. Post-installation steps for Linux: If you are on Linux, follow the post-installation steps to manage Docker as a non-root user.

  3. Verify Installation: Run the following command to verify that Docker is installed correctly.

    docker run hello-world
    

Deployment -

Setup environment variables

mv .env.example .env
# ------------------------------
# Redis Configuration
# ------------------------------
REDIS_URL=redis://username:your_password@HOST:PORT

# ------------------------------
# GitHub Configuration 
# ------------------------------
# Scopes required: 'repo' (to create repos and push code)
GITHUB_TOKEN=ghp_xxxxxx

# The GitHub username associated with the token above
GITHUB_USERNAME=github_username

Build and run

docker compose up --build -d

or

docker-compose up --build -d

View logs

docker-compose logs -f worker

Restart worker

docker-compose restart worker

Stop worker

docker-compose down

Rebuild after code changes

docker-compose up --build -d