add launch script and docker files

This commit is contained in:
Jean-Luc Agathos
2025-07-02 15:58:35 +02:00
parent 0f5d751056
commit df13c82878
3 changed files with 27 additions and 0 deletions

5
Dockerfile Normal file
View File

@@ -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"]

7
docker-compose.yml Normal file
View File

@@ -0,0 +1,7 @@
services:
doc:
image: workflows-doc:latest
build:
context: .
ports:
- "8000:8000"

15
run-as-docker-container.sh Executable file
View File

@@ -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