gitness
gitness copied to clipboard
Error ':'
Hello,
I trying to use Drone & Gitea with my docker-compose, but I have a problem... A erreur ":" I will explain you how have this error but before I will show you my docker-compose file.
version: "3"
networks:
gitea:
external: false
traefik:
external: true
services:
gitea:
image: gitea/gitea:1.17.1
container_name: gitea
# ports:
# - 22:22
environment:
- USER_UID=1000
- USER_GID=1000
- GITEA__database__DB_TYPE=postgres
- GITEA__database__HOST=db:5432
- GITEA__database__NAME=gitea
- GITEA__database__USER=gitea
- GITEA__database__PASSWD=gitea
restart: always
networks:
- gitea
- traefik
volumes:
- ./gitea:/data
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
depends_on:
- db
labels:
- traefik.enable=true
- traefik.docker.network=traefik
- traefik.http.routers.gitea.entrypoints=web, websecure
- traefik.http.routers.gitea.rule=Host(`git.foo.fr`)
- traefik.http.routers.gitea.tls=true
- traefik.http.services.gitea.loadbalancer.server.port=3000
- traefik.http.routers.gitea.tls.certresolver=production
db:
image: postgres:14
restart: always
environment:
- POSTGRES_USER=gitea
- POSTGRES_PASSWORD=gitea
- POSTGRES_DB=gitea
networks:
- gitea
volumes:
- ./postgres:/var/lib/postgresql/data
labels:
- traefik.enable=false
drone:
container_name: drone
image: drone/drone:latest
restart: unless-stopped
depends_on:
- gitea
environment:
# https://docs.drone.io/server/provider/gitea/
- DRONE_GITEA_SERVER=https://git.foo.fr
- DRONE_GITEA_CLIENT_ID=ac00a620-354e-4629-886e-8d4c7b635345
- DRONE_GITEA_CLIENT_SECRET=gto_vzitdskyhzcp2a466natmvduatmtab7mrdmk5ereqnzjqhf2x73a
- DRONE_RPC_SECRET=7c754a3ef8793b9fd8361c76789cc29c58ae6c0c
- DRONE_SERVER_HOST=drone.foo.fr
- DRONE_SERVER_PROTO=https
networks:
- traefik
- gitea
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./drone:/data
labels:
- traefik.enable=true
- traefik.docker.network=traefik
- traefik.http.routers.drone.entrypoints=web, websecure
- traefik.http.routers.drone.rule=Host(`drone.foo.fr`)
- traefik.http.routers.drone.tls=true
- traefik.http.services.drone.loadbalancer.server.port=80
- traefik.http.routers.drone.tls.certresolver=production
First I begin with Gitea for generate an access OAuth with my account admin, and I past on my docker-compose file. The synchronisation work, but for login I have an error:
link : https://drone.foo.fr/login/error?message=:
On my log I can see that :
drone | {"level":"error","msg":"oauth: cannot exchange code: gta_sx3wu3uf3jyezqi26s7bax2clzfq34xmrnmrj5y3gd3n7yf2eq4a: : ","time":"2022-10-05T18:16:44Z"}
drone | {"level":"debug","msg":"cannot authenticate user: : ","time":"2022-10-05T18:16:44Z"}
I'm getting the same error, and for me the reason is that CloudFlare is blocking network requests from Drone to Gitea.
Nice answer, I using too Cloudflare !
Maybe the project is not ready for me... I will change of solution, I hope in a future soon this problem will be solved 💕