Updating docker entrypoint to initialize the database

This commit is contained in:
2025-09-06 15:24:02 -04:00
parent 6d12ce25d3
commit 5eca8e08b1
5 changed files with 79 additions and 10 deletions

View File

@@ -25,6 +25,7 @@ COPY templates/ ./templates/
COPY migrations/ ./migrations/
COPY alembic.ini ./
COPY CLAUDE.md README.md ./
COPY entrypoint.sh ./
# Create necessary directories
RUN mkdir -p /app/data/logs /app/data/images /app/data/roms /app/data/metadata
@@ -46,5 +47,5 @@ HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
CMD curl -f http://localhost:8080/health || exit 1
# Default command
CMD ["python", "src/migrate.py", "init"]
CMD ["python", "-m", "uvicorn", "src.webapp:app", "--host", "0.0.0.0", "--port", "8080"]
# CMD ["python", "-m", "uvicorn", "src.webapp:app", "--host", "0.0.0.0", "--port", "8080"]
ENTRYPOINT ["./entrypoint.sh"]