revoltchat / self-hosted

Deploy Revolt using Docker.
903 stars 116 forks source link

bug: Unable to use external mongo database. #88

Closed dillfrescott closed 11 hours ago

dillfrescott commented 3 months ago

What happened?

I have correctly set all the strings and its saying:

api-1      |  INFO  revolt_config > Starting revolt-delta@0.7.12
api-1      |  INFO  revolt_database::models::admin_migrations::ops::mongodb > Migrating the database.
api-1      | thread 'main' panicked at 'Failed to fetch database names.: Error { kind: ServerSelection { message: "Server selection timeout: No available servers. Topology: { Type: Unknown, Servers: [ { Address: database:27017, Type: Unknown, Error: could not resolve address `(\"database\", 27017)` }, ] }" }, labels: {}, wire_version: None, source: None }', crates/core/database/src/models/admin_migrations/ops/mongodb.rs:23:14
api-1      | note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
api-1      |  INFO  revolt_config > Starting revolt-delta@0.7.12
api-1      |  INFO  revolt_database::models::admin_migrations::ops::mongodb > Migrating the database.

Over and over with no fix

dillfrescott commented 3 months ago

This has happened to me weeks apart with two separate clean installs of revolt

jquiaios commented 2 months ago

@dillfrescott A wild guess would be that maybe you've changed your URLs and variables in the .env file and not in the Revolt.toml config file (The config strategy and now uses Revolt.toml instead - see the cryptic message here, last paragraph).

Here's how I mounted the Revolt.toml in the self-hosted environment, in which I modified my URLs the same way I had previously done in my .env file, and it fixed my issue.

insertish commented 11 hours ago

README was updated to include new configuration instructions