pa11y/pa11y-dashboard

Trying to specify a port on MongoDB results in validation error

NickStees opened this issue · 1 comments

When trying to specify a port for the MongoDB service "database": "mongodb://mongodb/pa11y-webservice:27018", , I get an error, and I think that it should be allowed according to the docs

web_1 | Pa11y Dashboard started
web_1 | mode: production
web_1 | uri: http://:::4000
web_1 | /dashboard/node_modules/mongodb/lib/url_parser.js:91
web_1 | throw new Error('double colon in host identifier');

Hi @NickStees

Thanks for creating the issue., and sorry for the delay. If I'm not mistaken, Mongo's connection string format is as follows:

mongodb://[username:password@]host[:port][/[database][?options]]

That means that, in your example, the port should go right after the host, and not after the database name:

"database": "mongodb://mongodb:27018/pa11y-webservice"

Could you please give it a try, and reopen the issue if that doesn't seem to fix the problem? Thanks!

I hope it helps!