Presumably production ready xD

This commit is contained in:
Jonas Linter
2025-11-18 16:10:57 +01:00
parent ccdc66fb9b
commit 433026dd01
6 changed files with 129551 additions and 65 deletions

View File

@@ -33,6 +33,10 @@ COPY --from=builder /app/.venv /app/.venv
# Copy application code
COPY src/ ./src/
# Copy Alembic files for database migrations
COPY alembic.ini ./
COPY alembic/ ./alembic/
# Create directories and set permissions
RUN mkdir -p /app/logs && \
chown -R appuser:appuser /app
@@ -53,9 +57,8 @@ EXPOSE 8000
HEALTHCHECK --interval=120s --timeout=10s --start-period=60s --retries=3 \
CMD python -c "import requests; requests.get('http://localhost:8000/api/health', timeout=5)"
# Run the application with uvicorn
WORKDIR /app/src
CMD uvicorn alpine_bits_python.api:app \
# Run the application with run_api.py (includes migrations)
CMD python -m alpine_bits_python.run_api \
--host 0.0.0.0 \
--port 8000 \
--workers 4 \