Add Railway deployment config for 24/7 cloud paper trading

- Dockerfile: add templates copy, ENV PORT, update CMD to live engine
- Create src/live/health.py: threaded HTTP health server (/health, /state)
- Wire health server into src/live/run.py before engine loop
- Dashboard: add unauthenticated /health endpoint, use PORT env var
- Create railway.toml with Dockerfile builder and health check config
- docker-compose.yml: rename service to live-engine, add PORT env vars

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Brent Neale
2026-02-19 15:53:54 +10:00
parent 65ac3b296a
commit 4e2db68049
6 changed files with 82 additions and 4 deletions
+3 -1
View File
@@ -12,8 +12,10 @@ RUN pip install --no-cache-dir -r requirements.docker.txt
COPY config/system.yaml config/system.yaml
COPY src/ src/
COPY sql/ sql/
COPY templates/ templates/
RUN mkdir -p logs models
ENV PYTHONUNBUFFERED=1
CMD ["python", "src/order_executor.py"]
ENV PORT=8080
CMD ["python", "src/live/run.py"]