-
Notifications
You must be signed in to change notification settings - Fork 334
/
docker-compose.yml
102 lines (93 loc) · 2.95 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
# SERVICE LAYOUT:
#
# ================================================
# +-----+ +-------+
# | db | | redis |
# +-----+ +-------+
# ^ ^
# | |
# +-------+
# | web |
# +-------+
# ^
# |
# +----------------------------------+
# | mqtt |
# +----------------------------------+
# ^ ^ ^
# | | |
# +-------------+ +-------------+ +-------------+
# | log_digests | | rabbit_jobs | | delayed_job |
# +-------------+ +-------------+ +-------------+
#
# +--------+ +------------+
# | parcel | | typescript |
# +--------+ +------------+
# ================================================
services:
redis:
env_file: ".env"
image: redis:7
volumes:
- "./docker_volumes/redis/data:/data"
- "./docker_volumes/redis/conf:/usr/local/etc/redis"
expose: ["6379"]
db:
env_file: ".env"
image: postgres:16
restart: always
volumes: ["./docker_volumes/db:/var/lib/postgresql/data"]
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 passenger start"
ports: ["${API_PORT}:${API_PORT}"]
mqtt:
env_file: ".env"
build:
context: "."
dockerfile: docker_configs/rabbitmq.Dockerfile
ports: ["5672:5672", "1883:1883", "8883:8883", "3002:15675", "15672:15672"]
depends_on: ["web"]
environment: ["RABBITMQ_CONFIG_FILE=/farmbot/farmbot_rmq_config"]
volumes: ["./docker_volumes/rabbit:/farmbot"]
parcel:
env_file: ".env"
image: farmbot_web
volumes: [".:/farmbot", "./docker_volumes/bundle_cache:/bundle"]
command: bundle exec rake api:serve_assets
ports: ["3808:3808"]
typescript:
env_file: ".env"
image: farmbot_web
volumes: [".:/farmbot", "./docker_volumes/bundle_cache:/bundle"]
command: node_modules/typescript/bin/tsc -w --noEmit
delayed_job:
env_file: ".env"
image: farmbot_web
volumes: [".:/farmbot", "./docker_volumes/bundle_cache:/bundle"]
depends_on: ["mqtt"]
restart: always
command: bundle exec rake jobs:work
log_digests:
env_file: ".env"
image: farmbot_web
volumes: [".:/farmbot", "./docker_volumes/bundle_cache:/bundle"]
depends_on: ["mqtt"]
restart: always
command: bundle exec rake api:log_digest
rabbit_jobs:
stdin_open: true
tty: true
env_file: ".env"
image: farmbot_web
volumes: [".:/farmbot", "./docker_volumes/bundle_cache:/bundle"]
depends_on: ["mqtt"]
command: bundle exec rails r lib/rabbit_workers.rb