Closed mark-norgate closed 8 years ago
Two things to try:
Nope those things don't help I'm afraid. Shall follow your link...
Oh. Just noticed the link was to my own post, sorry about the duplicate.
Any further ideas? How should I be configuring PLUGIN_BITBUCKET_APP_KEY
and PLUGIN_BITBUCKET_APP_SECRET
if not in .striderrc
? Is it just a case of saying X=Y
in the terminal window before launching the app in pm2
?
I never used a .striderrc
file and I'm not sure what it does. I start Strider through a small script which looks like this:
$ cat /home/strider/start-strider
#/bin/sh
export NODE_ENV=development
export SERVER_NAME=…
export PORT=7777
export SMTP_HOST=…
export SMTP_PORT=25
export SMTP_USER=…
export SMTP_PASS=…
export SMTP_FROM=…
export PLUGIN_BITBUCKET_APP_KEY=…
export PLUGIN_BITBUCKET_APP_SECRET=…
export PLUGIN_GITHUB_APP_ID=…
export PLUGIN_GITHUB_APP_SECRET=…
export SESSION_SECRET=…
export CONCURRENT_JOBS=2
export DEBUG=strider*,modem
NODE_ENV=development forever start --uid strider -l /var/log/strider/strider.log --append --workingDir ~/strider/strider ~/strider/strider/bin/strider
Some of this obviously relates to Strider development, but you probably get the idea :)
Ok, I discovered what NODE_ENV
does, but don't know how I can augment this to use .striderrc
rather than a sh script, nor how to use PM2
rather than forever
. Any ideas anyone?
If you're using pm2, just set the variables in the env
block.
Hooray that works a treat @oliversalzburg, thanks very much. I'm getting closer and closer...
One final problem though....
The redirect after Bitbucket back to the Strider dashboard lacks the port (3000) which, if inserted manually into the URL, works perfectly well and displays a list of Bitbucket projects in Strider. Where is this configured? The port is correctly in the callback URL in Bitbucket, so it can't be there, and I'm not sure what further configuration I can do in apps.json
, which currently looks like this:
{
apps: [
{
"name": "strider",
"script": "bin/strider",
"instances": 1,
"instance_id_env": "STRIDER_APP_INSTANCE",
"exec_mode": "fork",
"env": {
"NODE_ENV": "production",
"SERVER_NAME": "http://ec2-xx-xx-xx-xx.compute-1.amazonaws.com",
"PORT": 3000,
"PLUGIN_BITBUCKET_APP_KEY": "xxx",
"PLUGIN_BITBUCKET_APP_SECRET": "xxx"
}
}
]
}
I couldn't see any corresponding port number in the configuration for forever
that you gave above.
Set SERVER_NAME
to http://ec2-xx-xx-xx-xx.compute-1.amazonaws.com:3000
Yes, genius! I imagined that PORT
setting would've taken care of that, but obviously not.
Thanks very much for your help. I've reached a real milestone.
Glad I could help :)
I have gotten to the stage of managing to get the Bitbucket link to appear within the Strider dashboard. However, clicking on it yields the following result:
I have obtained the OAuth consumer details from Bitbucket and have configured the Callback URL to what I think might be correct...
I have configured the hell out of the Strider instance, by setting
SERVER_NAME
,PLUGIN_BITBUCKET_APP_KEY
, andPLUGIN_BITBUCKET_APP_SECRET
in the terminal and within the.striderrc
. What else do I need to do?I have previously witnessed this working with my own very eyes, but there doesn't appear to be an solution anywhere on the world wide interweb. my OAuth knowledge is minimal so I'm finding it hard to use any brute-force method of fixing.
Literally gagging to hear your replies.