From df13c828784f6f962bdf264b5c3c6d093e374fa7 Mon Sep 17 00:00:00 2001 From: Jean-Luc Agathos Date: Wed, 2 Jul 2025 15:58:35 +0200 Subject: [PATCH] add launch script and docker files --- Dockerfile | 5 +++++ docker-compose.yml | 7 +++++++ run-as-docker-container.sh | 15 +++++++++++++++ 3 files changed, 27 insertions(+) create mode 100644 Dockerfile create mode 100644 docker-compose.yml create mode 100755 run-as-docker-container.sh diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..f5e2c52 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,5 @@ +FROM python:3.9.23-slim +COPY . /app +WORKDIR /app +RUN pip install -r requirements.txt +ENTRYPOINT ["python", "run.py", "--host", "0.0.0.0", "--port", "8000"] diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..a54d714 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,7 @@ +services: + doc: + image: workflows-doc:latest + build: + context: . + ports: + - "8000:8000" diff --git a/run-as-docker-container.sh b/run-as-docker-container.sh new file mode 100755 index 0000000..c0ebe38 --- /dev/null +++ b/run-as-docker-container.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +docker compose up -d --build + +# Vérifie le système d'exploitation +if [[ "$OSTYPE" == "darwin"* ]]; then + # macOS + open -a Safari http://localhost:8000 +elif [[ "$OSTYPE" == "msys" || "$OSTYPE" == "cygwin" ]]; then + # Windows (utilisation de commandes spécifiques à Windows) + start chrome http://localhost:8000 +else + # Système d'exploitation par défaut pour le navigateur local + echo "Le navigateur local n'est pas supporté sur ce système." +fi \ No newline at end of file