Установка Gitea в Docker
Официальная инструкция здесь https://docs.gitea.com/installation/install-with-docker
------------------------------------------------------------------------
Файл docker-compose.yml (настроен для совместной установки с Drone)
--------------------------------------------------------
version: '3.8'"3"
networks:
gitea:
external: false
services:
drone:server:
image: drone/drone:latestgitea/gitea:1.22.4
container_name: dronegitea
environment:
- DRONE_GITEA_SERVER=http://gitea:3000USER_UID=1000
- DRONE_RPC_SECRET=mysecretdronetokenUSER_GID=1000
- DRONE_SERVER_HOST=drone.localGITEA__database__DB_TYPE=mysql
- DRONE_SERVER_PROTO=http
ports:GITEA__database__HOST=db:3306
- "8080:80"
depends_on:GITEA__database__NAME=gitea
- GITEA__database__USER=gitea
restart: always
drone-runner:
image: drone/drone-runner-docker:latest
container_name: drone-runner
environment:
- DRONE_RPC_HOST=drone
- DRONE_RPC_PROTO=http
- DRONE_RPC_SECRET=mysecretdronetoken
volumes:
- /var/run/docker.sock:/var/run/docker.sockGITEA__database__PASSWD=gitea
restart: always
networks:
default:- name:gitea
dev-netvolumes:
- ./gitea:/data
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
ports:
- "3018:3000"
- "222:22"
depends_on:
- db
db:
image: mysql:8
restart: always
environment:
- MYSQL_ROOT_PASSWORD=gitea
- MYSQL_USER=gitea
- MYSQL_PASSWORD=gitea
- MYSQL_DATABASE=gitea
networks:
- gitea
volumes:
- ./mysql:/var/lib/mysql