mirror of
https://github.com/x1xhlol/system-prompts-and-models-of-ai-tools.git
synced 2026-06-17 23:09:35 +00:00
fix: bust Docker cache + make init_db non-fatal for Railway
- ARG CACHEBUST=2 forces pip install to re-run (picks up slimmed requirements) - init_db failure no longer kills the app — logs warning instead https://claude.ai/code/session_01W1rJthWDkasijTdXCfxVHs
This commit is contained in:
parent
6b91c96bff
commit
ff83d28eba
@ -11,7 +11,7 @@ RUN python -m venv /opt/venv
|
|||||||
ENV PATH="/opt/venv/bin:$PATH"
|
ENV PATH="/opt/venv/bin:$PATH"
|
||||||
|
|
||||||
COPY requirements.txt ./
|
COPY requirements.txt ./
|
||||||
|
ARG CACHEBUST=2
|
||||||
RUN pip install --no-cache-dir --upgrade pip setuptools wheel \
|
RUN pip install --no-cache-dir --upgrade pip setuptools wheel \
|
||||||
&& pip install --no-cache-dir -r requirements.txt
|
&& pip install --no-cache-dir -r requirements.txt
|
||||||
|
|
||||||
|
|||||||
@ -89,7 +89,10 @@ async def lifespan(app: FastAPI):
|
|||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(f" DLQ: init failed ({e})")
|
print(f" DLQ: init failed ({e})")
|
||||||
|
|
||||||
|
try:
|
||||||
await init_db()
|
await init_db()
|
||||||
|
except Exception as e:
|
||||||
|
print(f" DB init: failed ({e}) — will retry on first request")
|
||||||
yield
|
yield
|
||||||
# Shutdown
|
# Shutdown
|
||||||
stop_event.set()
|
stop_event.set()
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user