Build [v.1.3.9]
This commit is contained in:
@@ -19,6 +19,9 @@ RUN adduser --system --group appuser
|
||||
# Copy application files
|
||||
COPY backend ./backend
|
||||
|
||||
# Copy initialization scripts (shared with start_server.sh)
|
||||
COPY scripts ./scripts
|
||||
|
||||
# We define the data dir explicitly for Docker
|
||||
ENV DATA_DIR="/app/data"
|
||||
ENV LOGS_DIR="/app/logs"
|
||||
@@ -27,9 +30,12 @@ ENV LOGS_DIR="/app/logs"
|
||||
# although Docker volumes will handle ownership context.
|
||||
RUN mkdir -p /app/data /app/logs && chown -R appuser:appuser /app
|
||||
|
||||
# Make initialization scripts executable
|
||||
RUN chmod +x /app/scripts/init_data.sh /app/backend/entrypoint.sh
|
||||
|
||||
USER appuser
|
||||
|
||||
EXPOSE 8000
|
||||
|
||||
# Start Uvicorn pointing to the backend module
|
||||
CMD ["python", "-m", "uvicorn", "backend.main:app", "--host", "0.0.0.0", "--port", "8000"]
|
||||
# Entrypoint runs init_data.sh first, then starts uvicorn
|
||||
ENTRYPOINT ["/app/backend/entrypoint.sh"]
|
||||
|
||||
Reference in New Issue
Block a user