From 89332f913890bb968d52862fe74f07e68a109668 Mon Sep 17 00:00:00 2001 From: Akash Deep <90100995+ashdcodes@users.noreply.github.com> Date: Fri, 20 Mar 2026 21:54:26 +0530 Subject: [PATCH 1/2] feat: add Docker support with headless Chrome --- .env.example | 10 ++++++++ Dockerfile | 30 ++++++++++++++++++++++++ README-Docker.md | 57 ++++++++++++++++++++++++++++++++++++++++++++++ docker-compose.yml | 11 +++++++++ 4 files changed, 108 insertions(+) create mode 100644 .env.example create mode 100644 Dockerfile create mode 100644 README-Docker.md create mode 100644 docker-compose.yml diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..17e0dcd --- /dev/null +++ b/.env.example @@ -0,0 +1,10 @@ +LINKEDIN_EMAIL=your@email.com +LINKEDIN_PASSWORD=yourpassword + +# Optional: AI provider for smart form filling +# AI_PROVIDER=openai +# AI_API_KEY=sk-... + +# Optional: Pypes API integration +# CLIENT_SECRET= +# PYPES_BASE_URL=https://api.pypes.dev \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..4bc98a1 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,30 @@ +FROM --platform=linux/amd64 python:3.11-slim + +# System deps for Chrome +RUN apt-get update && apt-get install -y \ + wget gnupg ca-certificates fonts-liberation \ + libasound2 libatk-bridge2.0-0 libatk1.0-0 libcups2 \ + libdbus-1-3 libgdk-pixbuf2.0-0 libnspr4 libnss3 \ + libx11-xcb1 libxcomposite1 libxdamage1 libxrandr2 \ + libxss1 libgbm1 xdg-utils --no-install-recommends \ + && rm -rf /var/lib/apt/lists/* + +# Install Google Chrome +RUN wget -q -O /tmp/chrome.deb \ + https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb \ + && apt-get update && apt-get install -y /tmp/chrome.deb \ + && rm /tmp/chrome.deb + +WORKDIR /app + +COPY requirements.txt . +RUN pip install --no-cache-dir -r requirements.txt + +COPY . . + +ENV PYTHONUNBUFFERED=1 +# Tell the app to run headless +ENV HIRINGFUNNEL_HEADLESS=1 + +# --run requires a profile name; users pass it via env or override CMD +CMD ["python", "hiringfunnel.py", "--run", "default", "--headless"] \ No newline at end of file diff --git a/README-Docker.md b/README-Docker.md new file mode 100644 index 0000000..0d9076b --- /dev/null +++ b/README-Docker.md @@ -0,0 +1,57 @@ +## Docker + +Run FoxyApply in a container with headless Chrome — no local browser or Python setup needed. + +### Prerequisites + +- [Docker](https://docs.docker.com/get-docker/) installed and running + +### Setup + +**1. Copy the example env file and fill in your credentials:** +```bash +cp .env.example .env +``` + +Edit `.env`: +```env +LINKEDIN_EMAIL=your@email.com +LINKEDIN_PASSWORD=yourpassword +``` + +**2. Create a profile** (first run, interactive): +```bash +docker build -t foxyapply . +docker run -it --env-file .env foxyapply python hiringfunnel.py +``` + +This launches the TUI so you can create and save a profile. Profiles are stored in `profiles.json`. + +**3. Run non-interactively** (after a profile is created): +```bash +docker run --env-file .env \ + -v $(pwd)/profiles.json:/app/profiles.json \ + -v $(pwd)/logs:/app/logs \ + foxyapply python hiringfunnel.py --run "your-profile-name" --headless +``` + +The `-v` flags persist your profiles and logs outside the container. + +### Docker Compose (recommended) +```bash +cp .env.example .env +# Fill in your credentials in .env + +docker compose up --build +``` + +To change which profile runs, edit `docker-compose.yml`: +```yaml +command: ["python", "hiringfunnel.py", "--run", "your-profile-name", "--headless"] +``` + +### Notes + +- Chrome runs in headless mode inside Docker — you won't see a browser window +- Logs are written to `./logs/hiringfunnel.log` +- If LinkedIn requires manual login verification, run interactively with `-it` and remove `--headless` \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..bd0bcd1 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,11 @@ +version: "3.9" +services: + foxyapply: + build: . + env_file: + - .env + volumes: + - ./profiles.json:/app/profiles.json + - ./logs:/app/logs + command: ["python", "hiringfunnel.py", "--run", "default", "--headless"] + restart: unless-stopped \ No newline at end of file From 820b0b5e8b9a7fd2f4e5d5338c623980f758cf29 Mon Sep 17 00:00:00 2001 From: Akash Deep <90100995+ashdcodes@users.noreply.github.com> Date: Sat, 21 Mar 2026 23:58:08 +0530 Subject: [PATCH 2/2] feat: removed unused envars,merged docker README --- .env.example | 11 ++++----- README-Docker.md | 57 ---------------------------------------------- README.md | 59 ++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 63 insertions(+), 64 deletions(-) delete mode 100644 README-Docker.md diff --git a/.env.example b/.env.example index 17e0dcd..d2ec1ca 100644 --- a/.env.example +++ b/.env.example @@ -1,10 +1,7 @@ -LINKEDIN_EMAIL=your@email.com -LINKEDIN_PASSWORD=yourpassword +# Optional: Pypes API integration +CLIENT_SECRET= +PYPES_BASE_URL=https://api.pypes.dev # Optional: AI provider for smart form filling # AI_PROVIDER=openai -# AI_API_KEY=sk-... - -# Optional: Pypes API integration -# CLIENT_SECRET= -# PYPES_BASE_URL=https://api.pypes.dev \ No newline at end of file +# AI_API_KEY=sk-... \ No newline at end of file diff --git a/README-Docker.md b/README-Docker.md deleted file mode 100644 index 0d9076b..0000000 --- a/README-Docker.md +++ /dev/null @@ -1,57 +0,0 @@ -## Docker - -Run FoxyApply in a container with headless Chrome — no local browser or Python setup needed. - -### Prerequisites - -- [Docker](https://docs.docker.com/get-docker/) installed and running - -### Setup - -**1. Copy the example env file and fill in your credentials:** -```bash -cp .env.example .env -``` - -Edit `.env`: -```env -LINKEDIN_EMAIL=your@email.com -LINKEDIN_PASSWORD=yourpassword -``` - -**2. Create a profile** (first run, interactive): -```bash -docker build -t foxyapply . -docker run -it --env-file .env foxyapply python hiringfunnel.py -``` - -This launches the TUI so you can create and save a profile. Profiles are stored in `profiles.json`. - -**3. Run non-interactively** (after a profile is created): -```bash -docker run --env-file .env \ - -v $(pwd)/profiles.json:/app/profiles.json \ - -v $(pwd)/logs:/app/logs \ - foxyapply python hiringfunnel.py --run "your-profile-name" --headless -``` - -The `-v` flags persist your profiles and logs outside the container. - -### Docker Compose (recommended) -```bash -cp .env.example .env -# Fill in your credentials in .env - -docker compose up --build -``` - -To change which profile runs, edit `docker-compose.yml`: -```yaml -command: ["python", "hiringfunnel.py", "--run", "your-profile-name", "--headless"] -``` - -### Notes - -- Chrome runs in headless mode inside Docker — you won't see a browser window -- Logs are written to `./logs/hiringfunnel.log` -- If LinkedIn requires manual login verification, run interactively with `-it` and remove `--headless` \ No newline at end of file diff --git a/README.md b/README.md index d4e9e85..caaf891 100644 --- a/README.md +++ b/README.md @@ -48,6 +48,65 @@ python hiringfunnel.py pip install pytest .venv/bin/python -m pytest tests/ -v ``` +## Docker + +Run FoxyApply in a container with headless Chrome — no local browser or Python setup needed. + +### Prerequisites + +- [Docker](https://docs.docker.com/get-docker/) installed and running + +### Setup + +**1. Copy the example env file and fill in your credentials:** +```bash +cp .env.example .env +``` + +Edit `.env`: +```env +LINKEDIN_EMAIL=your@email.com +LINKEDIN_PASSWORD=yourpassword +``` + +**2. Create a profile** (first run, interactive): +```bash +docker build -t foxyapply . +docker run -it --env-file .env foxyapply python hiringfunnel.py +``` + +This launches the TUI so you can create and save a profile. Profiles are stored in `profiles.json`. + +**3. Run non-interactively** (after a profile is created): +```bash +docker run --env-file .env \ + -v $(pwd)/profiles.json:/app/profiles.json \ + -v $(pwd)/logs:/app/logs \ + foxyapply python hiringfunnel.py --run "your-profile-name" --headless +``` + +The `-v` flags persist your profiles and logs outside the container. + +### Docker Compose (recommended) +```bash +cp .env.example .env +# Fill in your credentials in .env + +docker compose up --build +``` + +To change which profile runs, edit `docker-compose.yml`: +```yaml +command: ["python", "hiringfunnel.py", "--run", "your-profile-name", "--headless"] +``` + +### Notes + +- Chrome runs in headless mode inside Docker — you won't see a browser window +- Logs are written to `./logs/hiringfunnel.log` +- If LinkedIn requires manual login verification, run interactively with `-it` and remove `--headless` + + ## License