From 76f2ea6e177f93db5ed9fc5340b4f48df36c02f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dalibor=20Karlovi=C4=87?= Date: Sat, 28 Oct 2017 12:51:58 +0200 Subject: [PATCH] docker-compose based command interface --- Dockerfile | 1 + README.md | 4 ++-- docker-compose.yml | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 5ba4b372b8..415705e276 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,6 +7,7 @@ COPY package.json /app/ RUN npm install -g node-gyp && npm install --unsafe-perm COPY . /app +RUN ln -s /app/zenbot.sh /usr/local/bin/zenbot ENV NODE_ENV production diff --git a/README.md b/README.md index b9014b287f..d874708b27 100644 --- a/README.md +++ b/README.md @@ -119,8 +119,8 @@ docker-compose --file=docker-compose-windows.yml up If you wish to run commands (e.g. backfills, list-selectors), you can run this separate command after a successful `docker-compose up -d`: ``` -docker run --rm --link zenbot_mongodb_1:mongodb -it zenbot_server list-selectors -docker run --rm --link zenbot_mongodb_1:mongodb -it zenbot_server backfill --days +docker-compose exec server zenbot list-selectors +docker-compose exec server zenbot backfill --days ``` ## Selectors diff --git a/docker-compose.yml b/docker-compose.yml index 2f7cda973f..5c3d6e434c 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -3,6 +3,7 @@ server: volumes: - ./conf.js:/app/conf.js - ./extensions:/app/extensions + - ./simulations:/app/simulations links: - mongodb command: [ "trade", "--paper" ]