add launch script and docker files
This commit is contained in:
5
Dockerfile
Normal file
5
Dockerfile
Normal 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
7
docker-compose.yml
Normal file
@@ -0,0 +1,7 @@
|
||||
services:
|
||||
doc:
|
||||
image: workflows-doc:latest
|
||||
build:
|
||||
context: .
|
||||
ports:
|
||||
- "8000:8000"
|
||||
15
run-as-docker-container.sh
Executable file
15
run-as-docker-container.sh
Executable 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
|
||||
Reference in New Issue
Block a user