pyfiche/Dockerfile
Kumi 23071d36f2
Added Docker setup for pyfiche services
Introduced a Dockerfile to containerize pyfiche alongside its dependencies. The setup includes the latest Python, installs pyfiche from a Git repository, and utilizes Supervisord for process management. Supervisord is configured to manage three pyfiche services: server, recup, and lines, ensuring they start on boot and restart on failure. Exposed ports allow external access, and a persistent data volume ensures data continuity. This encapsulates the pyfiche environment, providing a robust and consistent deployment method.
2024-01-22 09:18:32 +01:00

25 lines
686 B
Docker

FROM python:3.11
WORKDIR /usr/src/app
# Install pyfiche from the git repository
RUN pip install -U git+https://kumig.it/PrivateCoffee/pyfiche.git
# Install supervisord
RUN pip install supervisor
# Create a directory where pyfiche will store its data
RUN mkdir data
# Copy the supervisord configuration file into the container
COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
# Expose the ports that pyfiche, recup, and lines will run on
EXPOSE 9999
EXPOSE 9998
EXPOSE 9997
# Use VOLUME to allow data persistence
VOLUME ["/usr/src/app/data"]
# Run supervisord to manage the services
CMD ["/usr/local/bin/supervisord", "-c", "/etc/supervisor/conf.d/supervisord.conf"]