# Gitea, drone in local docker container(s)

**URL:** <https://drone.discourse.group/t/gitea-drone-in-local-docker-container-s/11063>\
**Category:** Drone Support\
**Created:** [October 17, 2019, 9:46am UTC](https://drone.discourse.group/t/gitea-drone-in-local-docker-container-s/11063 "2019-10-17T09:46:14Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![schotter](https://avatars.discourse-cdn.com/v4/letter/s/958977/32.png) [@schotter](https://drone.discourse.group/u/schotter)\
**Post date:** [October 17, 2019, 9:46am UTC](https://drone.discourse.group/t/gitea-drone-in-local-docker-container-s/11063/1 "2019-10-17T09:46:14Z")

</div>

Hello,

as the subject says, I want to see drone in combination with gitea run on my local machine. HTTPS is optional because currently I’m struggling to get drone up. gitea is running fine (on port 3000), I create the OAUTH id/secret pair, tell drone about it, but when I try to access drone (localhost) I run into an error: “The connection was reset”.

```auto
$ nmap localhost
Starting Nmap 7.80 ( https://nmap.org ) at 2019-10-17 11:40 CEST
Nmap scan report for localhost (127.0.0.1)
Host is up (0.00011s latency).
Other addresses for localhost (not scanned): ::1
Not shown: 998 closed ports
PORT STATE SERVICE
80/tcp open http
3000/tcp open ppp

```

My current `docker-compose.yml` is a bit of a mix of information I collected [here](https://blog.anoff.io/2019-03-24-self-hosted-gitea-drone/), [here](https://git.habd.as/comfusion/high-tea). It looks like this:

```auto
$ cat docker-compose.yml 
version: '3'

networks:
  gitea-nw:
    external: false

services:
  gitea-server:
    image: gitea/gitea:latest
    volumes:
      - ./gitea:/data
    environment:
      - USER_UID=1000
      - USER_GID=1000
      - DB_TYPE=postgres
      - DB_HOST=gitea-db:5432
      - DB_USER=gitea
      - DB_PASSWD=giteaPW
      - DB_NAME=gitea
    restart: always
    ports:
      - 3000:3000
      - 222:22
    networks:
      - gitea-nw
    depends_on:
      - gitea-db

  gitea-db:
    image: postgres:9.6
    volumes:
      - ./postgres:/var/lib/postgresql/data
    restart: always
    environment:
      - POSTGRES_USER=gitea
      - POSTGRES_PASSWORD=giteaPW
      - POSTGRES_DB=gitea
    networks:
      - gitea-nw

  drone-server:
    image: drone/drone:latest
    volumes:
      - ./drone/data/volumes/drone-server:/var/lib/drone
      - /var/run/docker.sock:/var/run/docker.sock
    environment:
      - DRONE_AGENTS_ENABLED=true
      - DRONE_GITEA_SERVER=localhost:3000
      - DRONE_GITEA_CLIENT_ID=8ea429db-d80f-4a82-be25-147397097f72
      - DRONE_GITEA_CLIENT_SECRET=OwzyEBzMcP55aPjyFXwIlB_HwvahDUCeNM0-9gEDAGg=
      - DRONE_RPC_SECRET=347e5504e9bf5282157f0c164ecd22c0
      - DRONE_SERVER_HOST=localhost
      - DRONE_SERVER_PORT=80
      - DRONE_SERVER_PROTO=http
      - DRONE_DEBUG=true
      - DRONE_GITEA_SKIP_VERIFY=false
      - DRONE_GIT_USERNAME="drone-runner"
      - DRONE_GIT_PASSWORD="anothersecretpassword"
      - DRONE_GIT_ALWAYS_AUTH=true
    restart: always
    ports:
      - 80:80
    networks:
      - gitea-nw
    depends_on:
      - gitea-server

  drone-agent:
    image: drone/agent:latest
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
    environment:
      - DRONE_SERVER="ws://drone-server/ws/broker"
      - DRONE_DEBUG=true
      - DRONE_RPC_SECRET=347e5504e9bf5282157f0c164ecd22c0
    restart: always
    command: agent
    networks:
      - gitea-nw

```

Could anyone provide me with a working example or point out my flaws?

Thanks a lot,  
Schotter
