Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
gitlab and drone server on docker for ubuntu 20
version: "3.7"
services:
# https://docs.gitea.io/en-us/install-with-docker/
gitea:
image: gitea/gitea:1.12.4
# https://hub.docker.com/r/gitea/gitea/tags
container_name: gitea
environment:
- APP_NAME=Gitea
- RUN_MODE=prod
- DOMAIN=gitea.localdns.xyz
- SSH_DOMAIN=gitea.localdns.xyz
- SSH_PORT=2222
- SSH_LISTEN_PORT=22
- HTTP_PORT=3000
- ROOT_URL=https://gitea.localdns.xyz
- LFS_START_SERVER=false
- DB_TYPE=sqlite3
- INSTALL_LOCK=true
- SECRET_KEY=
- DISABLE_REGISTRATION=false
- REQUIRE_SIGNIN_VIEW=true
- USER_UID=1000
- USER_GID=1000
restart: unless-stopped
volumes:
- gitea:/data
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
ports:
- "18082:3000"
- "2222:22"
networks:
- public
# https://docs.drone.io/server/provider/gitea/
drone-server:
image: drone/drone:1.9.0
# https://hub.docker.com/r/drone/drone/tags
container_name: drone-server
ports:
- 18083:80
- 9000
volumes:
- drone:/var/lib/drone/
restart: unless-stopped
depends_on:
- gitea
environment:
- DRONE_GITEA_CLIENT_ID=XX
- DRONE_GITEA_CLIENT_SECRET=XXYY
- DRONE_GITEA_SERVER=https://gitea.localdns.xyz
- DRONE_GIT_ALWAYS_AUTH=true
- DRONE_RPC_SECRET=xxxxxx
- DRONE_SERVER_HOST=drone.localdns.xyz
- DRONE_SERVER_PROTO=https
- DRONE_USER_CREATE=username:giteadmin,admin:true
networks:
- public
drone-docker-runner-pistack:
image: drone/drone-runner-docker:1.5.0
# https://hub.docker.com/r/drone/drone/tags
container_name: drone-docker-runner-pistack
restart: unless-stopped
volumes:
- /var/run/docker.sock:/var/run/docker.sock
environment:
- DRONE_RPC_PROTO=https
- DRONE_RPC_HOST=drone.localdns.xyz
- DRONE_RPC_SECRET=xxxxx
- DRONE_RUNNER_CAPACITY=5
- DRONE_RUNNER_MAX_PROCS=5
- DRONE_RUNNER_NETWORKS=public
- DRONE_RUNNER_NAME=drone-docker-runner
- DRONE_TRACE=false
- DRONE_DEBUG=false
- DRONE_RUNNER_LABELS=hardware:dedicated,runnerid:default
networks:
- public
volumes:
gitea:
driver: local
driver_opts:
o: bind
type: none
device: /disk2/docker-volumes/gitea2
drone:
driver: local
driver_opts:
o: bind
type: none
device: /data/docker-volumes/drone
networks:
public:
name: public
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment