/
docker-compose.yml
84 lines (79 loc) · 3.13 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
# Docker composition for starting up the Moor system in cargo-watch mode, running with separate `daemon` and `host`
# binaries (communicating via ZMQ RPC), with VictoriaMetrics and VMagent for metrics collection, and Grafana for
# visualization.
# The first time the image starts, it will import JHCore-DEV-2.db from the root of the repository. This is a recent
# JaysHouseCore database, with no modifications. After import, `development.db` will contain the (RocksDb) database
# that resulted. To re-import the textdump, simply delete this directory.
# This composition is not intended for production use, but for development and testing, but could be used as a template
# production once we're in a better place.
# After this is running, a MUD client / telnet client can connect to port 8888 on localhost to interact with the
# system. (e.g. telnet localhost 8888). Or a websocket client can connect to port 8080 on localhost.
# Grafana will be available at http://localhost:3000/ password is admin/admin
# victoriametrics will be available at http://localhost:8428/
version: "3.9"
volumes:
vmagentdata: {}
vmdata: {}
grafanadata: {}
networks:
moor_net:
services:
moor-daemon:
build: ./
security_opt:
- seccomp:unconfined
container_name: "moor-daemon"
volumes:
- ./.cargo/registry:/usr/local/cargo/registry:cached
- ./.target:/root/target:cached
- ./:/moor:cached
environment:
- CARGO_TARGET_DIR=/root/target
working_dir: /moor
command: >
sh -c "RUST_BACKTRACE=1 cargo watch -w crates/kernel -w crates/rpc-common -w crates/daemon -w crates/values -w crates/db -x
'run -p moor-daemon -- development.db --textdump=JHCore-DEV-2.db --generate-keypair --textdump-out=out.db'"
ports:
# ZMQ ports
- "7899:7899"
- "7898:7898"
# HTTP port for prometheus endpoint for metrics export
- "9000:9000"
networks:
- moor_net
moor-telnet-host:
build: ./
container_name: "moor-telnet-host"
volumes:
- ./.cargo/registry:/usr/local/cargo/registry:cached
- ./.target:/root/target:cached
- ./:/moor:cached
environment:
- CARGO_TARGET_DIR=/root/target
working_dir: /moor
command: >
sh -c "RUST_BACKTRACE=1 cargo watch -w crates/rpc-common -w crates/telnet-host -w crates/values -x
'run -p moor-telnet-host -- --telnet-address=0.0.0.0:8888 --rpc-server=tcp://moor-daemon:7899 --narrative-server=tcp://moor-daemon:7898'"
ports:
# Telnet listener
- "8888:8888"
networks:
- moor_net
moor-web-host:
build: ./
container_name: "moor-web-host"
volumes:
- ./.cargo/registry:/usr/local/cargo/registry:cached
- ./.target:/root/target:cached
- ./:/moor:cached
environment:
- CARGO_TARGET_DIR=/root/target
working_dir: /moor
command: >
sh -c "RUST_BACKTRACE=1 cargo watch -w crates/rpc-common -w crates/web-host -w crates/values -x
'run -p moor-web-host -- --listen-address=0.0.0.0:8080 --rpc-server=tcp://moor-daemon:7899 --narrative-server=tcp://moor-daemon:7898'"
ports:
# HTTP listener
- "8080:8080"
networks:
- moor_net