It looks like you have your gitlab server address set to localhost. This will never work because containers have isolated networks. localhost refers to the network inside the drone container. You need to deploy gitlab with a proper DNS and then configure Drone to connect to gitlab with DNS.
Drone without HTTPs is working absolutely fine behind an Apache reverse Proxy.
However, when I want to turn into HTTPs, am having some issues.
I cannot expose port 443 for the outside of the container since 443 is already being used by Apache.
I have tried to do it like 8000:443 but i end up with a proxy error.
More, i have done a test using the following setup
8443:8000
RequestHeader set X-Forwarded-Proto “https” in my vhost, i still get a proxy 502 error. It seems that there is something missing to make it work in HTTPs.
A module?
For info, in my broswer, i have the green padlock for my domain name.
I do not have much experience with Apache, so unfortunately I’m not sure there is much I can do to help. Maybe another community member with Apache experience can provide more details. Also consider posting to StackOverflow where you will have access to Apache subject matter experts.
is it mandatory for Drone to communincate onto 443:443 for SSL?
No, you could do something like 8443:443 for example. However I believe the best practice when using a reverse proxy like Apache would be to terminate SSL at Apache and then forward all traffic to Drone over http. Setting up https for Drone if sitting behind Apache is probably possible, but not something we see people do very often.
I should also point out that Drone has built-in support for TLS so there is really no need to run Apache in front of Drone unless you are using a shared server that is running multiple web applications. http://docs.drone.io/configure-ssl/
This configuration sounds a bit strange, though. Typically you would terminate SSL at Apache and then forward https traffic to Drone via http. Is there are reason you are not taking this approach?
Also note that Drone does not listen on port 443 inside the container unless you have configured SSL. Have you configured SSL as defined here http://docs.drone.io/configure-ssl/ ?
Yes i have configured the certificate as a volume and as environment settings as well.
This is what I am trying to achieve actually. So basically, I have a vhost listening on port 443 with the SSL path. Then inside my docker-compose, I have set 443: 8000. But since Apache is already listening to port 443, I cannot use the port 443 for my docker. If I try with port 8443:8000 inside my docker-compose, I end up having a proxy GET error.
I have been using/reffering to the online doc to configure so far
this won’t work because port 8000 is reserved for http and will not be able to process https connections. You would need to do something like -p 8080:80 -p 8443:443 and send https from apache to 8443
@bradrydzewski - finally I have been able to make it work in https by killing the TLS on Apache before getting into the container.
However, after authentication on Gitlab, am now having this error:
Client authentication failed due to unknown client, no client authentication included, or unsupported authentication method.
This error message comes from gitlab, so I recommend googling and looking in their documentation/forums to try to understand what causes this error. Maybe look at your gitlab server logs. I have never seen this error before, so I cannot really advise.
@bradrydzewski - i managed to get it working without the hassels of a proxying etc…
However, I made a stupid mistake somewhere while trying to get it on HTTPs. Am trying to revert back my changes but constantly getting
“The redirect URI included is not valid.”
Any idea?
I have strictly follow the drone.io documentation and I could manage to get it work at a point in time without https and now when am trying to rollback my changes to get it work again without https am getting this error.
Note that in Gitlab, for the call back, I have used as pattern “http://10...*/authorize”
the value in GitLab must match exactly the URL you see in your browser. This includes protocol and hostname.
setting X-Forwarded-For and X-Forwarded-Proto is essential when using a reverse proxy
If you access the website in the browser from https, the redirect URL registered in GitLab must also use https. In this case it looks like you have configured http and not https, which could indicate a configuration error.
drone running on port 80:8000 without Apache in front.
I can logon via OAuth from gitlab
I get my list of repo
When i click upon to active, i have the error Failed to activate…
inside my docker-compose.yml, I have set for the drone host the public IP of the machine. I have came across a post of yours [SOLVED] Failed to activate your repository? where it mention a similar issue.
However when i check in chrome developer tools, I see a 404 errror on the link http://35...*/api/repos/Ag76/MX (ip here is IP address of drone itself).