From 5a18ddcba1ad3fef8753a2891d1475105fe509d8 Mon Sep 17 00:00:00 2001 From: vvzvlad Date: Sun, 25 Aug 2024 21:37:14 +0300 Subject: [PATCH] Add docker-compose.yml --- docker-compose.yml | 48 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 docker-compose.yml diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..817b2fc --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,48 @@ +services: + inference: + container_name: inference-basic-eth-pred + build: . + command: python -u /app/app.py + ports: + - "8000:8000" + healthcheck: + test: ["CMD", "curl", "-f", "http://localhost:8000/inference/ETH"] + interval: 10s + timeout: 5s + retries: 12 + volumes: + - ./inference-data:/app/data + restart: always + + updater: + container_name: updater-basic-eth-pred + build: . + environment: + - INFERENCE_API_ADDRESS=http://inference:8000 + command: > + sh -c " + while true; do + python -u /app/update_app.py; + sleep 24h; + done + " + depends_on: + inference: + condition: service_healthy + restart: always + + worker: + container_name: worker + image: alloranetwork/allora-offchain-node:latest + volumes: + - ./worker-data:/data + depends_on: + inference: + condition: service_healthy + env_file: + - ./worker-data/env_file + restart: always + +volumes: + inference-data: + worker-data: \ No newline at end of file