mirror of
https://github.com/BrentNeale1/fx-quant.git
synced 2026-08-05 06:37:44 +00:00
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:
+6
-1
@@ -161,6 +161,11 @@ def validate_config(cfg):
|
||||
# ---------------------------------------------------------------------------
|
||||
# Routes
|
||||
# ---------------------------------------------------------------------------
|
||||
@app.route("/health")
|
||||
def health():
|
||||
return jsonify({"status": "ok"})
|
||||
|
||||
|
||||
@app.route("/")
|
||||
@requires_auth
|
||||
def index():
|
||||
@@ -589,4 +594,4 @@ def _parse_int_list(s):
|
||||
# Main
|
||||
# ---------------------------------------------------------------------------
|
||||
if __name__ == "__main__":
|
||||
app.run(host="0.0.0.0", port=5000, debug=False)
|
||||
app.run(host="0.0.0.0", port=int(os.environ.get("PORT", 5000)), debug=False)
|
||||
|
||||
Reference in New Issue
Block a user