2021-09-14 20:02:57 +00:00
|
|
|
# This docker-compose file is intended for development use. You can simply run
|
|
|
|
# `docker-compose up -d` in the repository and it should build and run all
|
|
|
|
# required parts of the application. See README.md for details.
|
|
|
|
#
|
|
|
|
# For a production docker setup, please check the corresponding documentation.
|
|
|
|
|
2021-02-17 21:19:42 +00:00
|
|
|
version: '3'
|
|
|
|
|
|
|
|
services:
|
|
|
|
mongo:
|
|
|
|
image: mongo
|
|
|
|
tty: true
|
|
|
|
volumes:
|
|
|
|
- ./local/mongo:/data/db
|
|
|
|
ports:
|
|
|
|
- '27017:27017'
|
|
|
|
restart: on-failure
|
|
|
|
|
2021-04-19 19:38:51 +00:00
|
|
|
redis:
|
|
|
|
image: redis
|
|
|
|
volumes:
|
|
|
|
- ./local/redis:/data
|
|
|
|
command: redis-server --appendonly yes
|
|
|
|
restart: on-failure
|
|
|
|
|
2021-02-17 21:19:42 +00:00
|
|
|
api:
|
|
|
|
image: obs-api
|
|
|
|
build:
|
|
|
|
context: ./api
|
|
|
|
volumes:
|
|
|
|
- ./api/src:/opt/obs/api/src
|
2021-04-19 19:38:51 +00:00
|
|
|
- ./api/scripts/obs:/opt/obs/api/scripts/obs
|
2021-02-23 19:20:16 +00:00
|
|
|
- ./api/views:/opt/obs/api/views
|
2021-02-17 21:19:42 +00:00
|
|
|
- ./local/api-data:/data
|
|
|
|
- ./api/.migrations.js:/opt/obs/api/.migrations.js
|
|
|
|
- ./api/migrations:/opt/obs/api/migrations/
|
2021-02-27 12:03:35 +00:00
|
|
|
- ./api/config.dev.json:/opt/obs/api/config.json
|
2021-02-17 21:19:42 +00:00
|
|
|
environment:
|
|
|
|
- PORT=3000
|
|
|
|
- MONGODB_URL=mongodb://mongo/obsTest
|
|
|
|
- DATA_DIR=/data
|
|
|
|
links:
|
|
|
|
- mongo
|
2021-04-19 19:38:51 +00:00
|
|
|
- redis
|
2021-02-17 21:19:42 +00:00
|
|
|
ports:
|
|
|
|
- '3000:3000'
|
|
|
|
restart: on-failure
|
|
|
|
command:
|
|
|
|
- npm
|
|
|
|
- run
|
|
|
|
- dev
|
|
|
|
|
2021-04-19 19:38:51 +00:00
|
|
|
worker:
|
|
|
|
image: obs-api
|
|
|
|
build:
|
|
|
|
context: ./api
|
|
|
|
volumes:
|
|
|
|
- ./api/src:/opt/obs/api/src
|
|
|
|
- ./api/scripts/obs:/opt/obs/api/scripts/obs
|
|
|
|
- ./api/views:/opt/obs/api/views
|
|
|
|
- ./local/api-data:/data
|
|
|
|
- ./api/config.dev.json:/opt/obs/api/config.json
|
|
|
|
environment:
|
|
|
|
- DATA_DIR=/data
|
|
|
|
links:
|
|
|
|
- mongo
|
|
|
|
- redis
|
|
|
|
restart: on-failure
|
|
|
|
command:
|
|
|
|
- npm
|
|
|
|
- run
|
|
|
|
- dev:worker
|
|
|
|
|
|
|
|
|
2021-02-17 21:19:42 +00:00
|
|
|
frontend:
|
|
|
|
image: obs-frontend
|
|
|
|
build:
|
|
|
|
context: ./frontend
|
|
|
|
volumes:
|
|
|
|
- ./frontend/src:/opt/obs/frontend/src
|
|
|
|
- ./frontend/public:/opt/obs/frontend/public
|
|
|
|
- ./frontend/tsconfig.json:/opt/obs/frontend/tsconfig.json
|
|
|
|
- ./frontend/package.json:/opt/obs/frontend/package.json
|
2021-09-14 20:02:57 +00:00
|
|
|
|
|
|
|
# Overwrite the default config with the development mode configuration
|
|
|
|
- ./frontend/config.dev.json:/opt/obs/frontend/public/config.json
|
2021-02-17 21:19:42 +00:00
|
|
|
environment:
|
|
|
|
- PORT=3000
|
|
|
|
links:
|
|
|
|
- api
|
|
|
|
ports:
|
|
|
|
- '3001:3000'
|
|
|
|
restart: on-failure
|
|
|
|
command:
|
|
|
|
- npm
|
|
|
|
- start
|