chore: fix dev setup

This commit is contained in:
Paul Bienkowski 2020-11-18 17:24:15 +01:00
parent 2ff842bd11
commit 5d16c4d541

View file

@ -1,35 +1,40 @@
version: '3' version: '3'
services: services:
mongo: mongo:
image: mongo image: mongo
tty: true tty: true
volumes: volumes:
- ./local/mongo:/data/db - ./local/mongo:/data/db
ports: ports:
- '27017:27017' - '27017:27017'
restart: on-failure restart: on-failure
api: api:
image: obs-api image: obs-api
build: build:
context: . context: .
dockerfile: ./Dockerfile dockerfile: ./Dockerfile
volumes: volumes:
- ./_helpers:/opt/obsAPI/_helpers - ./_helpers:/opt/obsAPI/_helpers
- ./_middleware:/opt/obsAPI/_middleware - ./_middleware:/opt/obsAPI/_middleware
- ./accounts:/opt/obsAPI/accounts - ./accounts:/opt/obsAPI/accounts
- ./config:/opt/obsAPI/config - ./config:/opt/obsAPI/config
- ./data:/opt/obsAPI/data - ./data:/opt/obsAPI/data
- ./models:/opt/obsAPI/models - ./models:/opt/obsAPI/models
- ./public:/opt/obsAPI/public - ./logic:/opt/obsAPI/logic
- ./routes:/opt/obsAPI/routes - ./public:/opt/obsAPI/public
- ./app.js:/opt/obsAPI/app.js - ./routes:/opt/obsAPI/routes
environment: - ./app.js:/opt/obsAPI/app.js
- PORT=3000 environment:
- MONGODB_URL=mongodb://mongo/obsTest - PORT=3000
links: - MONGODB_URL=mongodb://mongo/obsTest
- mongo links:
ports: - mongo
- '3000:3000' ports:
restart: on-failure - '3000:3000'
restart: on-failure
command:
- npm
- run
- dev