From c4a7585b35f246607ad87f5bdb2e59cb84f556ca Mon Sep 17 00:00:00 2001 From: Justin Brooks Date: Fri, 25 Jan 2019 22:08:55 -0500 Subject: [PATCH] Switched prod and dev docker-compose files --- docker-compose.dev.yml | 53 +++++++++++++++++++++++++++++++++++++++++ docker-compose.prod.yml | 26 -------------------- docker-compose.yml | 33 +++---------------------- 3 files changed, 56 insertions(+), 56 deletions(-) create mode 100644 docker-compose.dev.yml delete mode 100644 docker-compose.prod.yml diff --git a/docker-compose.dev.yml b/docker-compose.dev.yml new file mode 100644 index 00000000..477564fc --- /dev/null +++ b/docker-compose.dev.yml @@ -0,0 +1,53 @@ +version: '3' +volumes: + mongodb_data: + external: false +networks: + cocoannotator: + external: false + +services: + frontend: + container_name: annotator_client + build: + context: . + dockerfile: ./docker/client/Dockerfile + ports: + - '8080:8080' + volumes: + - './client:/workspace/client' + networks: + - cocoannotator + depends_on: + - flask + flask: + container_name: annotator_flask + build: + context: . + dockerfile: ./docker/api/Dockerfile + ports: + - '5000:5000' + volumes: + - './datasets:/datasets' + - './app:/workspace/app' + - './.git:/workspace/.git' + environment: + - FLASK_APP=app + - FLASK_ENV=development + networks: + - cocoannotator + depends_on: + - database + database: + image: mongo:4 + container_name: annotator_mongodb + environment: + - MONGO_DATA_DIR=/data/db + - MONGO_LOG_DIR=/dev/null + volumes: + - 'mongodb_data:/data/db' + ports: + - '27017:27017' + command: 'mongod --smallfiles --logpath=/dev/null' + networks: + - cocoannotator diff --git a/docker-compose.prod.yml b/docker-compose.prod.yml deleted file mode 100644 index 1b8cb1c6..00000000 --- a/docker-compose.prod.yml +++ /dev/null @@ -1,26 +0,0 @@ -version: '3' -volumes: - mongodb_data: - external: false -services: - flask: - image: jsbroks/coco-annotator:latest - restart: always - ports: - - '5000:5000' - volumes: - - './datasets:/datasets' - depends_on: - - database - database: - image: mongo:4 - container_name: annotator_mongodb - restart: always - environment: - - MONGO_DATA_DIR=/data/db - - MONGO_LOG_DIR=/dev/null - volumes: - - 'mongodb_data:/data/db' - ports: - - '27017:27017' - command: 'mongod --smallfiles --logpath=/dev/null' diff --git a/docker-compose.yml b/docker-compose.yml index 477564fc..1b8cb1c6 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -2,45 +2,20 @@ version: '3' volumes: mongodb_data: external: false -networks: - cocoannotator: - external: false - services: - frontend: - container_name: annotator_client - build: - context: . - dockerfile: ./docker/client/Dockerfile - ports: - - '8080:8080' - volumes: - - './client:/workspace/client' - networks: - - cocoannotator - depends_on: - - flask flask: - container_name: annotator_flask - build: - context: . - dockerfile: ./docker/api/Dockerfile + image: jsbroks/coco-annotator:latest + restart: always ports: - '5000:5000' volumes: - './datasets:/datasets' - - './app:/workspace/app' - - './.git:/workspace/.git' - environment: - - FLASK_APP=app - - FLASK_ENV=development - networks: - - cocoannotator depends_on: - database database: image: mongo:4 container_name: annotator_mongodb + restart: always environment: - MONGO_DATA_DIR=/data/db - MONGO_LOG_DIR=/dev/null @@ -49,5 +24,3 @@ services: ports: - '27017:27017' command: 'mongod --smallfiles --logpath=/dev/null' - networks: - - cocoannotator