From 5d16c4d541ebfcc65e400dc14540ed9921ffae57 Mon Sep 17 00:00:00 2001 From: Paul Bienkowski Date: Wed, 18 Nov 2020 17:24:15 +0100 Subject: [PATCH] chore: fix dev setup --- docker-compose.yaml | 67 ++++++++++++++++++++++++--------------------- 1 file changed, 36 insertions(+), 31 deletions(-) diff --git a/docker-compose.yaml b/docker-compose.yaml index c07ecc4..ceaa263 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -1,35 +1,40 @@ version: '3' services: - mongo: - image: mongo - tty: true - volumes: - - ./local/mongo:/data/db - ports: - - '27017:27017' - restart: on-failure + mongo: + image: mongo + tty: true + volumes: + - ./local/mongo:/data/db + ports: + - '27017:27017' + restart: on-failure - api: - image: obs-api - build: - context: . - dockerfile: ./Dockerfile - volumes: - - ./_helpers:/opt/obsAPI/_helpers - - ./_middleware:/opt/obsAPI/_middleware - - ./accounts:/opt/obsAPI/accounts - - ./config:/opt/obsAPI/config - - ./data:/opt/obsAPI/data - - ./models:/opt/obsAPI/models - - ./public:/opt/obsAPI/public - - ./routes:/opt/obsAPI/routes - - ./app.js:/opt/obsAPI/app.js - environment: - - PORT=3000 - - MONGODB_URL=mongodb://mongo/obsTest - links: - - mongo - ports: - - '3000:3000' - restart: on-failure + api: + image: obs-api + build: + context: . + dockerfile: ./Dockerfile + volumes: + - ./_helpers:/opt/obsAPI/_helpers + - ./_middleware:/opt/obsAPI/_middleware + - ./accounts:/opt/obsAPI/accounts + - ./config:/opt/obsAPI/config + - ./data:/opt/obsAPI/data + - ./models:/opt/obsAPI/models + - ./logic:/opt/obsAPI/logic + - ./public:/opt/obsAPI/public + - ./routes:/opt/obsAPI/routes + - ./app.js:/opt/obsAPI/app.js + environment: + - PORT=3000 + - MONGODB_URL=mongodb://mongo/obsTest + links: + - mongo + ports: + - '3000:3000' + restart: on-failure + command: + - npm + - run + - dev