Presumably production ready xD
This commit is contained in:
@@ -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 \
|
||||
|
||||
Reference in New Issue
Block a user