replace Redis with an embedded SQLite string->string KV store (group commit, in-tx events, SQL search)
Build and Push Docker Image / build (push) Successful in 2m44s
Build and Push Docker Image / build (push) Successful in 2m44s
This commit is contained in:
@@ -9,7 +9,7 @@ set -e
|
||||
|
||||
# Create required directories
|
||||
mkdir -p /meta-core/locks
|
||||
mkdir -p /meta-core/db/redis
|
||||
mkdir -p /meta-core/db
|
||||
mkdir -p /meta-core/mounts/errors
|
||||
mkdir -p /files
|
||||
mkdir -p /var/log/supervisor
|
||||
|
||||
@@ -4,9 +4,10 @@
|
||||
#
|
||||
# The flock here is a MUTEX, not service discovery. It is the only thing
|
||||
# stopping two containers that mount the same /meta-core volume from putting
|
||||
# two Redis writers on one RDB/AOF. Sibling services no longer read anything
|
||||
# from this directory — they locate meta-core over UDP (meta-discovery v1, see
|
||||
# docs/project-architecture/service-discovery.md), so the kv-leader.info file
|
||||
# two writers on one database file (/meta-core/db/meta-core.db). Sibling
|
||||
# services no longer read anything from this directory — they locate meta-core
|
||||
# over UDP (beacon v2, see docs/project-architecture/beacon-v2.md), so the
|
||||
# kv-leader.info file
|
||||
# this script used to publish is gone. Keep the lock; it costs nothing and the
|
||||
# corruption it prevents is unrecoverable.
|
||||
#
|
||||
|
||||
+3
-17
@@ -16,26 +16,13 @@ serverurl=unix:///var/run/supervisor.sock
|
||||
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface
|
||||
|
||||
# =============================================================================
|
||||
# Redis: Key-value store (managed by supervisord, started before meta-core)
|
||||
# Previously spawned by Go code, now managed by bash-based leader election
|
||||
# =============================================================================
|
||||
[program:redis]
|
||||
command=/usr/bin/redis-server --port %(ENV_REDIS_PORT)s --bind 0.0.0.0 --protected-mode no --dir /meta-core/db/redis --appendonly yes --appendfilename appendonly.aof --dbfilename dump.rdb --save 60 1 --loglevel warning --notify-keyspace-events Kg$
|
||||
priority=1
|
||||
autostart=true
|
||||
autorestart=true
|
||||
stdout_logfile=/dev/stdout
|
||||
stdout_logfile_maxbytes=0
|
||||
stderr_logfile=/dev/stderr
|
||||
stderr_logfile_maxbytes=0
|
||||
startsecs=2
|
||||
|
||||
# =============================================================================
|
||||
# meta-core: HTTP API, Mount API, File Watcher (connects to local Redis)
|
||||
# meta-core: HTTP API, Mount API, File Watcher, metadata store (embedded SQLite)
|
||||
# =============================================================================
|
||||
[program:meta-core]
|
||||
command=/usr/local/bin/meta-core
|
||||
priority=10
|
||||
; Room to finish in-flight writes and checkpoint the WAL on shutdown.
|
||||
stopwaitsecs=60
|
||||
autostart=true
|
||||
autorestart=true
|
||||
stdout_logfile=/dev/stdout
|
||||
@@ -50,7 +37,6 @@ environment=
|
||||
SERVICE_VERSION="%(ENV_SERVICE_VERSION)s",
|
||||
META_CORE_HTTP_PORT="%(ENV_META_CORE_HTTP_PORT)s",
|
||||
META_CORE_HTTP_HOST="%(ENV_META_CORE_HTTP_HOST)s",
|
||||
REDIS_PORT="%(ENV_REDIS_PORT)s",
|
||||
WATCH_INTERVAL_MS="%(ENV_WATCH_INTERVAL_MS)s",
|
||||
API_PORT="80",
|
||||
BASE_URL="%(ENV_BASE_URL)s"
|
||||
|
||||
Reference in New Issue
Block a user