Farmbot-Web-App/docker-compose.yml

101 lines
2.9 KiB
YAML
Raw Permalink Normal View History

2019-04-04 14:54:07 -06:00
# SERVICE LAYOUT:
#
# ================================================
# +-----+ +-------+
# | db | | redis |
# +-----+ +-------+
# ^ ^
# | |
# +-------+
# | web |
# +-------+
# ^
# |
# +----------------------------------+
# | mqtt |
# +----------------------------------+
# ^ ^ ^
# | | |
# +-------------+ +-------------+ +-------------+
# | log_digests | | rabbit_jobs | | delayed_job |
# +-------------+ +-------------+ +-------------+
#
# +--------+ +------------+
# | parcel | | typescript |
# +--------+ +------------+
# ================================================
2019-11-07 09:40:19 -07:00
version: "3"
services:
2018-10-04 20:09:50 -06:00
redis:
2019-04-04 14:18:38 -06:00
env_file: ".env"
image: redis:5
2018-10-05 09:58:16 -06:00
volumes:
2019-04-04 14:18:38 -06:00
- "./docker_volumes/redis/data:/data"
- "./docker_volumes/redis/conf:/usr/local/etc/redis"
expose: ["6379"]
2019-04-03 13:57:27 -06:00
2019-04-04 14:18:38 -06:00
db:
env_file: ".env"
2019-08-08 22:13:03 -06:00
image: postgres:10
2019-04-04 14:18:38 -06:00
volumes: ["./docker_volumes/db:/var/lib/postgresql/data"]
2019-10-04 14:09:22 -06:00
# ports: ["5432:5432"]
2019-04-04 14:18:38 -06:00
web:
env_file: ".env"
depends_on: ["db", "redis"]
image: farmbot_web
volumes: [".:/farmbot", "./docker_volumes/bundle_cache:/bundle"]
stdin_open: true
tty: true
build:
context: "."
dockerfile: docker_configs/api.Dockerfile
command: bash -c "rm -f tmp/pids/server.pid && bundle exec rails s -e development
-p ${API_PORT} -b 0.0.0.0"
ports: ["${API_PORT}:${API_PORT}"]
2019-04-03 13:57:27 -06:00
mqtt:
2019-04-04 14:18:38 -06:00
env_file: ".env"
2019-11-07 09:40:19 -07:00
image: rickcarlino/experimental-docker-rmq:latest
2019-04-04 14:18:38 -06:00
ports: ["5672:5672", "1883:1883", "8883:8883", "3002:15675", "15672:15672"]
depends_on: ["web"]
2019-04-03 13:57:27 -06:00
environment: ["RABBITMQ_CONFIG_FILE=/farmbot/farmbot_rmq_config"]
2019-04-04 14:18:38 -06:00
volumes: ["./docker_volumes/rabbit:/farmbot"]
2019-04-03 13:57:27 -06:00
2019-04-04 14:54:07 -06:00
parcel:
2019-04-04 14:18:38 -06:00
env_file: ".env"
image: farmbot_web
volumes: [".:/farmbot", "./docker_volumes/bundle_cache:/bundle"]
2019-04-04 14:54:07 -06:00
command: bundle exec rake api:serve_assets
ports: ["3808:3808"]
2019-04-04 14:18:38 -06:00
2019-04-04 14:54:07 -06:00
typescript:
2019-04-04 14:18:38 -06:00
env_file: ".env"
image: farmbot_web
volumes: [".:/farmbot", "./docker_volumes/bundle_cache:/bundle"]
2019-04-04 14:54:07 -06:00
command: node_modules/typescript/bin/tsc -w --noEmit
2019-04-03 13:57:27 -06:00
delayed_job:
2019-04-04 14:18:38 -06:00
env_file: ".env"
image: farmbot_web
volumes: [".:/farmbot", "./docker_volumes/bundle_cache:/bundle"]
2019-04-04 14:54:07 -06:00
depends_on: ["mqtt"]
2018-10-01 14:06:26 -06:00
command: bundle exec rake jobs:work
2019-04-03 13:57:27 -06:00
log_digests:
2019-04-04 14:18:38 -06:00
env_file: ".env"
image: farmbot_web
volumes: [".:/farmbot", "./docker_volumes/bundle_cache:/bundle"]
2019-04-04 14:54:07 -06:00
depends_on: ["mqtt"]
2018-10-01 14:06:26 -06:00
command: bundle exec rake api:log_digest
2019-04-03 13:57:27 -06:00
rabbit_jobs:
stdin_open: true
tty: true
2019-04-04 14:18:38 -06:00
env_file: ".env"
image: farmbot_web
volumes: [".:/farmbot", "./docker_volumes/bundle_cache:/bundle"]
2019-04-04 14:54:07 -06:00
depends_on: ["mqtt"]
command: bundle exec rails r lib/rabbit_workers.rb