Add asyncssh dependency, fix scheduler datetime comparison for naive/aware timezones, and update Docker configuration to use port 8008 with proper application structure and Alembic migrations support
Tests / Backend Tests (Python) (3.10) (push) Has been cancelled
Tests / Backend Tests (Python) (3.11) (push) Has been cancelled
Tests / Backend Tests (Python) (3.12) (push) Has been cancelled
Tests / Frontend Tests (JS) (push) Has been cancelled
Tests / Integration Tests (push) Has been cancelled
Tests / All Tests Passed (push) Has been cancelled
Tests / Backend Tests (Python) (3.10) (push) Has been cancelled
Tests / Backend Tests (Python) (3.11) (push) Has been cancelled
Tests / Backend Tests (Python) (3.12) (push) Has been cancelled
Tests / Frontend Tests (JS) (push) Has been cancelled
Tests / Integration Tests (push) Has been cancelled
Tests / All Tests Passed (push) Has been cancelled
This commit is contained in:
+17
-5
@@ -22,6 +22,10 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
ansible \
|
||||
git \
|
||||
curl \
|
||||
libjpeg62-turbo \
|
||||
zlib1g \
|
||||
libfreetype6 \
|
||||
libpng16-16 \
|
||||
fonts-noto-color-emoji \
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
&& apt-get clean
|
||||
@@ -33,12 +37,19 @@ RUN mkdir -p /root/.ssh && chmod 700 /root/.ssh
|
||||
COPY app/requirements.txt ./
|
||||
RUN pip install --no-cache-dir -r requirements.txt
|
||||
|
||||
# Copie du code de l'application
|
||||
COPY app/ ./
|
||||
# Copie du point d'entrée principal
|
||||
COPY main.py ./
|
||||
|
||||
# Copie du code de l'application (doit rester un sous-dossier /app/app/)
|
||||
COPY app/ ./app/
|
||||
|
||||
# Copie de la configuration Ansible
|
||||
COPY ansible/ /ansible/
|
||||
|
||||
# Copie des fichiers Alembic (migrations)
|
||||
COPY alembic/ /alembic/
|
||||
COPY alembic.ini /alembic.ini
|
||||
|
||||
# Création du répertoire pour les clés SSH (sera monté en volume)
|
||||
RUN mkdir -p /app/ssh_keys /app/data
|
||||
|
||||
@@ -46,16 +57,17 @@ RUN mkdir -p /app/ssh_keys /app/data
|
||||
ENV ANSIBLE_CONFIG=/ansible/ansible.cfg
|
||||
|
||||
# Variables par défaut pour la base SQLite dans le conteneur
|
||||
ENV LOGS_DIR=/app/data
|
||||
ENV HOMELAB_DATA_DIR=/app/data
|
||||
ENV DB_PATH=/app/data/homelab.db
|
||||
ENV DATABASE_URL=sqlite+aiosqlite:////app/data/homelab.db
|
||||
|
||||
# Exposition du port
|
||||
EXPOSE 8000
|
||||
EXPOSE 8008
|
||||
|
||||
# Health check
|
||||
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
|
||||
CMD curl -f http://localhost:8000/api/health || exit 1
|
||||
CMD curl -f http://localhost:8008/api/health || exit 1
|
||||
|
||||
# Commande de démarrage
|
||||
CMD ["python", "-m", "uvicorn", "app_optimized:app", "--host", "0.0.0.0", "--port", "8000"]
|
||||
CMD ["python", "-m", "uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8008"]
|
||||
|
||||
Reference in New Issue
Block a user