Hi,
We have a Connect app in which we configured our credentials.json to register the add-on to a specific instance. But now we want to use the app in our live server and I know that we don’t need the credentials.json file anymore there and we’ve removed it and made the necessary changes to atlassian-connect.json and config.json. But we are unable to move forward as we are getting a bunch of database errors at our server console. We have changed the database url and type in config.json also.
Can someone please convey me some steps we need to follow after we have removed the credentials file, changed the baseURL from atlassian-connect and config files?
We are stuck and unable to get any webhook data/notifications as add-on is not registering.
Thanks in advance.
So many questions…
- How are you hosting this app?
- Where are you hosting this app?
- Does your hosting service support environment variables?
- Have you specified the database connection string (
$DATABASE_URL
) in your environment variables?
I think thats good for starters.
I’m guessing that your config.json looks something like this for production:
{
...
// Configuration for production, which is enabled by setting
// the NODE_ENV=production environment variable.
"production": {
// PaaS like Heroku will provide HTTP port via environment variable.
"port": "$PORT",
// Use views/unauthorized.hbs for error page.
"errorTemplate": true,
// Public URL to production app.
"localBaseUrl": "https://your.app",
"store": {
"type": "postgres",
"url": "$DATABASE_URL",
"ssl": true,
"dialect": "postgres",
"dialectOptions": {
"ssl": {
"require": true,
"rejectUnauthorized": false
}
}
},
// The app can only be registered by the products on these domains:
"whitelist": [
"*.jira-dev.com",
"*.atlassian.net",
"*.atlassian.com",
"*.jira.com"
],
"appKey": "your.app.key"
},
"signed-install": "force",
// this needs to be last, otherwise it does not work - weirdness
"product": "confluence"
}
Hi @david,
Thank you for your response.
Answering your questions first, we are hosting the app on our linux server by pushing the code and making required configurations. Yes, our service supports env variables and we are using it too. We have specified the Database connection in the format-> mysql://username:password@hostname:port/database.
Coming to the config.json we have made the necessary changes but we didn’t had this bit of code there:
"ssl": true,
"dialect": "postgres",
"dialectOptions": {
"ssl": {
"require": true,
"rejectUnauthorized": false
}
}
We will try by inserting this code according to our setup and will let you know if we get any further issues.
Having said that, do we need anymore changes? or any more setup? I have read at many places that we would need to host our app to the marketplace. Is this a necessary step?
Hmm. Not sure about whether you need the dialectOptions
part for your mysql. You’ll have to play with that one.
You don’t need to “host the app to the marketplace” if it’s just private for your instance.
We actually have a client who needs confluence app integrated to their store and they can install, run commands and get notifications, search from their own app’s workspace channel (just like slack).
We have checked the “dialectOptions” but we are still not getting any “Registered message” in our console (used to get it locally) while starting the server and webhooks still aren’t getting triggered.
Any ideas?