refactor: retire legacy tinode database routing
This commit is contained in:
@@ -112,7 +112,7 @@ ENV ADMIN_INTERNAL_API_SECRET=
|
||||
ENV ADMIN_INTERNAL_API_TIMEOUT_MS=3000
|
||||
|
||||
# The PostgreSQL DSN connection.
|
||||
ENV POSTGRES_DSN='postgresql://postgres:postgres@localhost:5432/tinode?sslmode=disable&connect_timeout=10'
|
||||
ENV POSTGRES_DSN='postgresql://postgres:postgres@localhost:5432/meeting_im?sslmode=disable&connect_timeout=10'
|
||||
|
||||
# Disable chatbot plugin by default.
|
||||
ENV PLUGIN_PYTHON_CHAT_BOT_ENABLED=false
|
||||
|
||||
@@ -14,7 +14,7 @@ COPY . .
|
||||
RUN CGO_ENABLED=0 go build -tags mysql -o /out/tinode ./server
|
||||
RUN CGO_ENABLED=0 go build -tags mysql -o /out/init-db ./tinode-db
|
||||
# scripts/apply_hotgo_tenant_db.go is `//go:build ignore`-tagged (a standalone
|
||||
# migration script, not part of any package) - build it by exact file path.
|
||||
# startup database validator, not part of any package) - build it by exact path.
|
||||
RUN CGO_ENABLED=0 go build -o /out/apply-hotgo-tenant-db ./scripts/apply_hotgo_tenant_db.go
|
||||
|
||||
# ---- Stage 2: runtime image ----
|
||||
|
||||
@@ -91,11 +91,11 @@
|
||||
"dsn": "$POSTGRES_DSN"
|
||||
},
|
||||
"rethinkdb": {
|
||||
"database": "tinode",
|
||||
"database": "meeting_im",
|
||||
"addresses": "rethinkdb"
|
||||
},
|
||||
"mongodb": {
|
||||
"database": "tinode",
|
||||
"database": "meeting_im",
|
||||
"addresses": "mongodb",
|
||||
"replica_set": "rs0"
|
||||
}
|
||||
|
||||
@@ -164,8 +164,8 @@ else
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Create/upgrade the hotgo tenant registry and the workbench/org/meetings/
|
||||
# reports/mailbox/etc. tables that init-db above does not manage.
|
||||
# Validate that startup is pointed at the shared meeting_im database. Schema
|
||||
# changes are applied separately and are never performed during pod startup.
|
||||
run_with_retries "apply-hotgo-tenant-db" apply_hotgo_tenant_db_once
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "./apply-hotgo-tenant-db failed. Quitting."
|
||||
|
||||
Reference in New Issue
Block a user