From eaf947fc3c9e7ffc0c73572a86e64f1c4ce16f1b Mon Sep 17 00:00:00 2001 From: Thomas Sileo Date: Mon, 21 May 2018 11:53:58 +0200 Subject: [PATCH] Tweak docker-compose to allow starting multiple instances --- .env | 3 +++ docker-compose.yml | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) create mode 100644 .env diff --git a/.env b/.env new file mode 100644 index 0000000..70fb2a3 --- /dev/null +++ b/.env @@ -0,0 +1,3 @@ +WEB_PORT=5005 +CONFIG_DIR=./config +DATA_DIR=./data diff --git a/docker-compose.yml b/docker-compose.yml index ad08caa..5ce5dee 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -3,12 +3,12 @@ services: web: build: . ports: - - "5005:5005" + - "${WEB_PORT}:5005" links: - mongo - rabbitmq volumes: - - "./config:/app/config" + - "${CONFIG_DIR}:/app/config" - "./static:/app/static" environment: - MICROBLOGPUB_AMQP_BROKER=pyamqp://guest@rabbitmq// @@ -25,6 +25,6 @@ services: mongo: image: "mongo:latest" volumes: - - "./data:/data/db" + - "${DATA_DIR}:/data/db" rabbitmq: image: "rabbitmq:latest"