I have a Fly app that runs MongoDB from mongo
image attached with volume, it is running smoothly, and I can log in and create a database using fly ssh console
.
But I cannot connect it from my other Fly app (let’s call it HelloApp),
- from HelloApp, I can ping mongo app using
.internal
domain - my
DATABASE_URL=mongodb://user:pass@mongo-production.internal:27017/db-production
- I can’t connect using
nc -vz mongo-production.internal 27017
- I can’t connect using mongoshell as well
- from Mongo app, tcp 27017 is open
here’s my mongo fly.toml config
app = "mongo-production"
kill_signal = "SIGINT"
kill_timeout = 5
processes = []
[build]
image = "mongo:latest"
[env]
[experimental]
allowed_public_ports = []
auto_rollback = true
[[services]]
http_checks = []
internal_port = 27017
processes = ["app"]
protocol = "tcp"
script_checks = []
[services.concurrency]
hard_limit = 25
soft_limit = 20
type = "connections"
[[services.tcp_checks]]
grace_period = "1s"
interval = "15s"
restart_limit = 0
timeout = "2s"
[[mounts]]
destination = "/data/db"
source = "mongo_production"
not sure what step I missed
anything I could check and do?
Thank you