86 lines
2.3 KiB
YAML
86 lines
2.3 KiB
YAML
|
services:
|
||
|
redis:
|
||
|
image: docker.dragonflydb.io/dragonflydb/dragonfly
|
||
|
restart: unless-stopped
|
||
|
ulimits:
|
||
|
memlock: -1
|
||
|
ports:
|
||
|
- 6379:6379
|
||
|
volumes:
|
||
|
- redis:/data
|
||
|
|
||
|
postgres:
|
||
|
image: postgres:17
|
||
|
restart: unless-stopped
|
||
|
ports:
|
||
|
- 5432:5432
|
||
|
environment:
|
||
|
POSTGRES_DB: gorse
|
||
|
POSTGRES_USER: gorse
|
||
|
POSTGRES_PASSWORD: gorse
|
||
|
volumes:
|
||
|
- pg_data:/var/lib/postgresql/data
|
||
|
|
||
|
worker:
|
||
|
image: zhenghaoz/gorse-worker
|
||
|
restart: unless-stopped
|
||
|
command: >
|
||
|
--master-host master --master-port 8086
|
||
|
--http-host 0.0.0.0 --http-port 8089
|
||
|
--log-path /var/log/gorse/worker.log
|
||
|
--cache-path /var/lib/gorse/worker_cache.data
|
||
|
volumes:
|
||
|
- gorse_log:/var/log/gorse # Mount log files in volume.
|
||
|
- worker_data:/var/lib/gorse # Mount cache files in volume.
|
||
|
depends_on:
|
||
|
- master
|
||
|
|
||
|
server:
|
||
|
image: zhenghaoz/gorse-server
|
||
|
restart: unless-stopped
|
||
|
ports:
|
||
|
- 8087:8087 # RESTful APIs and Prometheus metrics export port.
|
||
|
command: >
|
||
|
--master-host master --master-port 8086
|
||
|
--http-host 0.0.0.0 --http-port 8087
|
||
|
--log-path /var/log/gorse/server.log
|
||
|
--cache-path /var/lib/gorse/server_cache.data
|
||
|
volumes:
|
||
|
- gorse_log:/var/log/gorse # Mount log files in volume.
|
||
|
- server_data:/var/lib/gorse # Mount cache files in volume.
|
||
|
depends_on:
|
||
|
- master
|
||
|
|
||
|
master:
|
||
|
image: zhenghaoz/gorse-master
|
||
|
restart: unless-stopped
|
||
|
ports:
|
||
|
- 8086:8086 # HTTP port
|
||
|
- 8088:8088 # gRPC port
|
||
|
environment:
|
||
|
# Use Redis as cache storage backend.
|
||
|
GORSE_CACHE_STORE: redis://redis:6379
|
||
|
# Use MySQL as data storage backend.
|
||
|
GORSE_DATA_STORE: postgres://gorse:gorse@postgres:5432/gorse?sslmode=disable
|
||
|
command: >
|
||
|
-c /etc/gorse/config.toml
|
||
|
--log-path /var/log/gorse/master.log
|
||
|
--cache-path /var/lib/gorse/master_cache.data
|
||
|
volumes:
|
||
|
# Mount the configuration file.
|
||
|
- ../config/gorse/config.toml:/etc/gorse/config.toml
|
||
|
# Mount log files in volume.
|
||
|
- gorse_log:/var/log/gorse
|
||
|
# Mount cache files in volume.
|
||
|
- master_data:/var/lib/gorse
|
||
|
depends_on:
|
||
|
- redis
|
||
|
- postgres
|
||
|
|
||
|
volumes:
|
||
|
pg_data:
|
||
|
redis:
|
||
|
gorse_log:
|
||
|
worker_data:
|
||
|
server_data:
|
||
|
master_data:
|