Files
stonks-oracle/docker/Dockerfile
T
Celes Renata 6169efdc89 fix: copy scripts/ into Docker image + graceful backfill fallback
- Dockerfile now copies scripts/ directory into /app/scripts/
- Init container uses sh -c with fallback so missing script
  doesn't crash the pod (graceful degradation until image rebuilds)
2026-04-30 23:18:43 +00:00

33 lines
772 B
Docker

# Base image: uses Harbor proxy cache in CI, falls back to Docker Hub externally
FROM registry.celestium.life/dockerhub-cache/library/python:3.12-slim
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1
ENV PYTHONPATH=/app
RUN apt-get update && apt-get install -y --no-install-recommends \
gcc \
libpq-dev \
curl \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY services/ /app/services/
COPY scripts/ /app/scripts/
COPY tests/ /app/tests/
COPY conftest.py /app/conftest.py
RUN useradd -m -u 1000 stonks && \
chown -R stonks:stonks /app
USER stonks
ARG SERVICE_CMD="python -m services.scheduler.app"
ENV SERVICE_CMD=${SERVICE_CMD}
CMD ["sh", "-c", "${SERVICE_CMD}"]