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