Closed sebv closed 9 years ago
I've seen this too - are you using the strider docker container?
yes
Yeah, think it's this issue: https://github.com/Strider-CD/strider-dockerfile/issues/9
(this is another reason we should move the dockerfile into this repo, to avoid duping issues)
You need to make a new docker container which has the env variables defined in supervisord.conf. You can either build a new one (docker build etc) or edit the file in the stock one and commit.
See also https://github.com/Strider-CD/strider-dockerfile/blob/master/supervisord.conf#L17
We do need to document this more clearly though.
I did, it doesn't work.
This works for me. SSH into the docker container and edit the file /etc/supervisor/conf.d/supervisord.conf
. Then commit the resulting container (along with the startup commands) and re-run it. It works fine.
For example, we use the following for https://public-ci.stridercd.com:
[program:node]
command = env PORT=3000 SERVER_NAME=https://public-ci.stridercd.com GITHUB_APP_ID=<id> GITHUB_APP_SECRET=<secret> SMTP_HOST=smtp.mailgun.org SMTP_USER=<user> SMTP_PASS=<password> DB_URI=mongodb://<foo>
Am trying with master. (doing git pull + npm update on container)
Let's reopen this until we have better docs - this is non-obvious.
Ok I got it working. That was a me misusing supervisorctl, I forgot the reread/update stage.
This would need a quick doc, even better configuration method, it's not fun to squeeze so many characters in one line with vi.
@sebv thoughts on #202 ? would be an easy contribution if you are interested in helping :-)
I'll have a look a bit later, I want to use it first. Maybe I can use it for wd test, am getting tired of travis.
Seeing similar behavior inside of a docker container. Having trouble starting a docker container with env variable for server name to be an IP address instead of a url. This causes the github callback url to be used as localhost:3000 and even if manually changed in the redirect param still doesn't link properly. Will update if I can figure out a workaround.
@sebv
Ok I got it working. That was a me misusing supervisorctl, I forgot the reread/update stage.
Can you elaborate on what you mean here? I'm having some trouble getting this working.
FYI with the new Dockerfile in strider repo (or docker pull strider/strider image) you can set environment variables via docker run
E.g.
docker run -e DB_URI=foo -e SERVER_NAME=https://example.com strider/strider
should work. You shouldn't have to modify the image.
Stale
When 'linking with github account' from a remote host. The callback url is 'localhost'. I had to manually change it to register. I havn't check the other hooks yet, will do it once I have some scripts to run.
My environments variables are configured in the supervisor conf file.