Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run in Docker #4

Open
redimongo opened this issue Oct 2, 2024 · 3 comments
Open

Run in Docker #4

redimongo opened this issue Oct 2, 2024 · 3 comments

Comments

@redimongo
Copy link

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
Copy link
Contributor

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

@redimongo
Copy link
Author

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
Copy link
Collaborator

agates commented Oct 3, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants