From b2af17598b2169c6b92596ae5fa72291dfcda9ed Mon Sep 17 00:00:00 2001 From: niederle Date: Wed, 28 Mar 2018 11:46:03 +0200 Subject: [PATCH] duplicate docker-compose files for building / running purpose --- Makefile | 2 +- docker-compose.buil.yml | 30 ++++++++++++++++++++++++++++++ docker-compose.yml | 5 ----- 3 files changed, 31 insertions(+), 6 deletions(-) create mode 100644 docker-compose.buil.yml diff --git a/Makefile b/Makefile index 0748078..0378d54 100644 --- a/Makefile +++ b/Makefile @@ -14,7 +14,7 @@ run-prod: ## run conditor-api with prod parameters NODE_ENV=production docker-compose up -d run-debug: ## run conditor-api with debug parameters - NODE_ENV=development DEBUG=* docker-compose -f ./docker-compose.yml up + NODE_ENV=development DEBUG=* docker-compose -f ./docker-compose.build.yml up kill: ## stop running containers (the hard way) docker-compose -f ./docker-compose.yml kill diff --git a/docker-compose.buil.yml b/docker-compose.buil.yml new file mode 100644 index 0000000..c733d0f --- /dev/null +++ b/docker-compose.buil.yml @@ -0,0 +1,30 @@ +version: '2' +services: + + conditorapi: + container_name: conditor-api + build: + context: . + args: + - http_proxy + - https_proxy + image: conditor/conditor-api:1.0.0-beta.1 + environment : + LOG_PATH: /var/log + CONDITOR_API_HOST: 0.0.0.0 + CONDITOR_API_PORT: 63332 + CONDITOR_ES_HOSTS: ${CONDITOR_ES_HOSTS} + NODE_ENV: ${NODE_ENV} + CONDITOR_ES_VERSION: 6.x + + ports: + - 63332:63332 + networks: + - apinet + volumes: + - ${LOG_PATH}:/root/var/log + restart: "on-failure:5" + +networks: + apinet: + driver: bridge diff --git a/docker-compose.yml b/docker-compose.yml index c733d0f..bc56fbe 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -3,11 +3,6 @@ services: conditorapi: container_name: conditor-api - build: - context: . - args: - - http_proxy - - https_proxy image: conditor/conditor-api:1.0.0-beta.1 environment : LOG_PATH: /var/log