Hi, I have installed Drone in Docker and connect it with Gitea.
$ curl https://drone.halfakop.ru/login
<a href="https://git.halfakop.ru/login/oauth/authorize?client_id=aa50fd5d-9449-4223-ada3-e3347076703d&redirect_uri=https%3A%2F%2Fdrone.halfakop.ru%2Flogin&response_type=code&state=56ec3f2525632186">See Other</a>.
$ curl https://drone.halfakop.ru/login\?code\=t2O1jE_y1mMba3XFUZMqCCTzQvwD4woo6MqeJc1eEaw%3D\&state\=30b95ff183c471d4
<a href="/login/error?message=http: named cookie not present">See Other</a>.
$ curl 'https://drone.halfakop.ru/login?code=t2O1jE_y1mMba3XFUZMqCCTzQvwD4woo6MqeJc1eEaw%3D&state=30b95ff183c471d4' -H 'authority: drone.halfakop.ru' -H 'cache-control: max-age=0' -H 'upgrade-insecure-requests: 1' -H 'user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.130 Safari/537.36 OPR/66.0.3515.44' -H 'accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9' -H 'sec-fetch-site: cross-site' -H 'sec-fetch-mode: navigate' -H 'accept-encoding: gzip, deflate, br' -H 'accept-language: en-GB,en-US;q=0.9,en;q=0.8' -H 'cookie: _oauth_state_=30b95ff183c471d4' --compressed
<html>
<head><title>504 Gateway Time-out</title></head>
<body>
<center><h1>504 Gateway Time-out</h1></center>
<hr><center>nginx/1.17.8</center>
</body>
</html>
I use LetsEncrypt proxy from https://github.com/JrCs/docker-letsencrypt-nginx-proxy-companion
It seems that proxy unable to pass the latest request:
Feb 07 09:50:20 dev-ams3-01 docker-compose[10809]: nginx | 2020/02/07 09:50:20 [error] 100#100: *938 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 185.62.193.101, server: drone.halfakop.ru, request: "GET /login?code=iJad8v8hQiBpMenwVGXtUQwdAA1Id7TtGGN6OLOD3o0%3D&state=4d65822107fcfd52 HTTP/2.0", upstream: "http://172.18.0.7:80/login?code=iJad8v8hQiBpMenwVGXtUQwdAA1Id7TtGGN6OLOD3o0%3D&state=4d65822107fcfd52", host: "drone.halfakop.ru", referrer: "https://drone.halfakop.ru/"
Feb 07 09:50:20 dev-ams3-01 docker-compose[10809]: nginx | drone.halfakop.ru 185.62.193.101 - - [07/Feb/2020:09:50:20 +0000] "GET /login?code=iJad8v8hQiBpMenwVGXtUQwdAA1Id7TtGGN6OLOD3o0%3D&state=4d65822107fcfd52 HTTP/2.0" 504 569 "https://drone.halfakop.ru/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.130 Safari/537.36"
The docker-compose file:
services:
drone-server:
image: drone/drone:latest
restart: always
hostname: drone
domainname: halfakop.ru
volumes:
- drone:/data/
- /var/run/docker.sock:/var/run/docker.sock
environment:
- DRONE_GIT_ALWAYS_AUTH=true
- DRONE_AGENTS_ENABLED=true
- DRONE_GITEA_SERVER=https://git.halfakop.ru
- DRONE_GITEA_CLIENT_ID=<id-here>
- DRONE_GITEA_CLIENT_SECRET=<secret-here>
- DRONE_RPC_SECRET=<rpc-here>
- DRONE_SERVER_HOST=drone.halfakop.ru
- DRONE_SERVER_PROTO=https
- DRONE_DEBUG=true
- DRONE_LOGS_DEBUG=true
- DRONE_LOGS_TEXT=true
- DRONE_LOGS_PRETTY=true
- VIRTUAL_PORT=80
- VIRTUAL_HOST=drone.halfakop.ru
- LETSENCRYPT_HOST=drone.halfakop.ru
- LETSENCRYPT_EMAIL=<email-here>
networks:
- devtools
expose:
- 80
logging:
options:
max-size: 10m