Forráskód Böngészése

fix yet more problems

Benoît Hubert 3 éve
szülő
commit
196e771363
1 módosított fájl, 31 hozzáadás és 0 törlés
  1. 31 0
      README.md

+ 31 - 0
README.md

@@ -21,6 +21,37 @@ Add this line to the hosts file (`/etc/hosts` on Linux/MacOS, `C:\WINDOWS\SYSTEM
 
 Otherwise check [How to access host port from docker container](https://stackoverflow.com/questions/31324981/how-to-access-host-port-from-docker-container)
 
+**This (probably should) be the same for the `drone` host: make it have the same URL from inside as from outside the Docker network.
+
+Otherwise webhooks fail:
+
+```
+gitea_1         | 2022/02/26 16:20:34 ...s/webhook/deliver.go:253:DeliverHooks() [E] deliver: Post "http://localhost:8080/hook?secret=N9Jrij0g8aiRZlRBTAgSkbnprODpyuZy": dial tcp 127.0.0.1:8080: webhook can only call allowed HTTP servers (check your webhook.ALLOWED_HOST_LIST setting), deny 'localhost(127.0.0.1:8080)'
+```
+
+Workaround: in `http://localhost:3000/<user>/<repo>/settings/hooks/<id>`, change URL from `http://localhost:8080` to `http://drone:80`.
+
+## Gitea security settings
+
+Another error
+
+```
+gitea_1         | 2022/02/26 16:24:05 ...s/webhook/deliver.go:253:DeliverHooks() [E] deliver: Post "http://drone:8080/hook?secret=N9Jrij0g8aiRZlRBTAgSkbnprODpyuZy": dial tcp 172.23.0.4:8080: webhook can only call allowed HTTP servers (check your webhook.ALLOWED_HOST_LIST setting), deny 'drone(172.23.0.4:8080)'
+```
+
+Add this to Gitea conf inside Gitea volume: `~/gitea/conf/app.ini`.
+
+```
+[webhook]
+ALLOWED_HOST_LIST = drone
+```
+
+## ALSO in Gitea's repos...
+
+```
+UPDATE repos SET repo_clone_url = 'http://drone:3000/benoit/gitea-drone.git' WHERE repo_id = 1;
+```
+
 ## Noob errors
 
 * `DRONE_SERVER_HOST` is the host address from the outside (not for inside the Docker network)