diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..28c8999 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,25 @@ +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"] diff --git a/supervisord.conf b/supervisord.conf new file mode 100644 index 0000000..2a87735 --- /dev/null +++ b/supervisord.conf @@ -0,0 +1,17 @@ +[supervisord] +nodaemon=true + +[program:pyfiche-server] +command=pyfiche-server -o /usr/src/app/data +autostart=true +autorestart=true + +[program:pyfiche-recup] +command=pyfiche-recup -o /usr/src/app/data +autostart=true +autorestart=true + +[program:pyfiche-lines] +command=pyfiche-lines -o /usr/src/app/data +autostart=true +autorestart=true