# Gitea integration using wrong URLs

**URL:** <https://drone.discourse.group/t/gitea-integration-using-wrong-urls/8245>\
**Category:** Drone Support\
**Created:** [August 31, 2018, 10:12am UTC](https://drone.discourse.group/t/gitea-integration-using-wrong-urls/8245 "2018-08-31T10:12:17Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Aragur](https://yyz1.discourse-cdn.com/flex003/user_avatar/drone.discourse.group/aragur/32/4484_2.png) [@Aragur](https://drone.discourse.group/u/Aragur)\
**Post date:** [August 31, 2018, 10:12am UTC](https://drone.discourse.group/t/gitea-integration-using-wrong-urls/8245/1 "2018-08-31T10:12:17Z")

</div>

I am running a drone ci instance using the following docker-compose.yml

```auto
version: '2'

networks:
  drone:
    external: false
  proxy:
    external:
      name: proxy

services:
  drone-server:
    image: drone/drone:0.8
    expose:
      - 8000
      - 9000
    volumes:
      - ./drone:/var/lib/drone/
    restart: always
    networks:
      - proxy
      - drone
    environment:
      - DRONE_OPEN=true
      - DRONE_HOST={{REMOVED}}
      - DRONE_SECRET={{REMOVED}}D
      - DRONE_GITEA=true
      - DRONE_GITEA_URL={{REMOVED}}
      - DRONE_GITEA_GIT_USERNAME=Drone
      - DRONE_GITEA_GIT_PASSWORD={{REMOVED}}
      - DRONE_GITEA_PRIVATE_MODE=true

  drone-agent:
    image: drone/agent:0.8

    command: agent
    restart: always
    networks:
      - drone
    depends_on:
      - drone-server
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
    environment:
      - DRONE_SERVER=drone-server:9000
      - DRONE_SECRET={{REMOVED}}

```

After pushing into a activated repository Gitea shows the build status.  
[![Example image](https://canada1.discourse-cdn.com/flex003/uploads/testdrone/original/2X/e/ec5cb38e39392307dc4e834b09cae36b345ca929.png)](https://user-images.githubusercontent.com/11004008/44058996-32bb097a-9f50-11e8-9d06-65a1e2cc26cb.png)  
If the build succeeded the URL is working as expected (Redirecting to the defined DRONE\_HOST)  
But if a build is still pending or fails the URL redirects to [http://drone-server:8000/](http://drone-server:8000/)

I don’t think this is an intended behavior.  
If you need any other details or configuration, let me know.

---

<div class="post-metadata">

**Author:** ![bradrydzewski](https://yyz1.discourse-cdn.com/flex003/user_avatar/drone.discourse.group/bradrydzewski/32/3513_2.png) [@bradrydzewski](https://drone.discourse.group/u/bradrydzewski)\
**Post date:** [August 31, 2018, 2:49pm UTC](https://drone.discourse.group/t/gitea-integration-using-wrong-urls/8245/2 "2018-08-31T14:49:31Z")

</div>

drone uses the incoming http.Request (e.g. webhook) to determine the URL. The only exception are status updates (e.g passing or failing) which use the DRONE\_HOST variable. I discuss this more here:  
[http://discuss.harness.io/t/drone-host-in-webhooks/2164/2?u=bradrydzewski](http://discuss.harness.io/t/drone-host-in-webhooks/2164/2)
