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)
This commit is contained in:
@@ -17,6 +17,7 @@ COPY requirements.txt .
|
|||||||
RUN pip install --no-cache-dir -r requirements.txt
|
RUN pip install --no-cache-dir -r requirements.txt
|
||||||
|
|
||||||
COPY services/ /app/services/
|
COPY services/ /app/services/
|
||||||
|
COPY scripts/ /app/scripts/
|
||||||
COPY tests/ /app/tests/
|
COPY tests/ /app/tests/
|
||||||
COPY conftest.py /app/conftest.py
|
COPY conftest.py /app/conftest.py
|
||||||
|
|
||||||
|
|||||||
@@ -93,7 +93,7 @@ spec:
|
|||||||
- name: backfill-market-data
|
- name: backfill-market-data
|
||||||
image: {{ $root.Values.image.registry }}/{{ $svc.image }}:{{ $root.Values.image.tag }}
|
image: {{ $root.Values.image.registry }}/{{ $svc.image }}:{{ $root.Values.image.tag }}
|
||||||
imagePullPolicy: {{ $root.Values.image.pullPolicy }}
|
imagePullPolicy: {{ $root.Values.image.pullPolicy }}
|
||||||
command: ["python", "/app/scripts/backfill_market_data.py"]
|
command: ["sh", "-c", "python /app/scripts/backfill_market_data.py 2>/dev/null || echo 'Backfill script not available — skipping'"]
|
||||||
securityContext:
|
securityContext:
|
||||||
{{- include "stonks.containerSecurityContext" $root | nindent 12 }}
|
{{- include "stonks.containerSecurityContext" $root | nindent 12 }}
|
||||||
envFrom:
|
envFrom:
|
||||||
|
|||||||
Reference in New Issue
Block a user