Podcastindex-org / podping-hivewatcher

A watcher script for the hive backed podping network.
MIT License
12 stars 5 forks source link

Run in Docker #4

Open redimongo opened 2 months ago

redimongo commented 2 months ago

Would love an example on how to run this and the websocket in a docker container, seems Ubuntu doesn't like the install process.

I also have't been able to get the socket command to work

Dockerfile

# Use an official Python runtime as a parent image
FROM python:3.10-slim

# Set the working directory in the container
WORKDIR /app

# Install Poetry using pip
RUN pip install --no-cache-dir poetry

# Install websocat via apt-get
RUN apt-get update && apt-get install -y websocat \
    && apt-get clean

# Copy pyproject.toml and poetry.lock to install dependencies
COPY pyproject.toml poetry.lock ./

# Install Python dependencies using Poetry
RUN poetry config virtualenvs.create false \
    && poetry install --no-interaction --no-ansi

# Copy the rest of the application code
COPY . .

# Run the hive-watcher using poetry
CMD ["poetry", "run", "python3", "-u", "./hive-watcher.py", "--socket", "172.18.0.3:8080", "--json"]
daveajones commented 2 months ago

Maybe @agates can help. I’m not very good with Python.

redimongo commented 2 months ago

It's ok, I made a work around I just Curl the output response to our server. PodID has stored over 5000 RSS urls via podping, which we will start spidering

agates commented 1 month ago

I haven't touched this in ages, and I don't think the socket is even supported anymore. I can try to get it to work but the new rust version I'm nearly done with will probably be a better bet.