From a0ee1faac6b3cdc7907fd0a2bde28911f562df21 Mon Sep 17 00:00:00 2001 From: Russia9 Date: Sun, 13 Mar 2022 21:10:48 +0300 Subject: [PATCH] gitea --- src/gitea.md | 59 +++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 56 insertions(+), 3 deletions(-) diff --git a/src/gitea.md b/src/gitea.md index 442a990..79d41a5 100644 --- a/src/gitea.md +++ b/src/gitea.md @@ -8,9 +8,29 @@ Переходим туда, где хотим хранить Gitea (У меня `/srv/gitea`) -[Docker-compose](docker/docker-compose/gitea.md) +### `docker-compose.yml`: +```yaml +version: "3.3" + +services: + server: + image: gitea/gitea + container_name: gitea + environment: + - USER_UID=1001 + - USER_GID=1001 + restart: always + volumes: + - ./gitea:/data + - /etc/timezone:/etc/timezone:ro + - /etc/localtime:/etc/localtime:ro + - /home/git/.ssh/:/data/git/.ssh + ports: + - "127.0.0.1:3000:3000" + - "127.0.0.1:2222:22" +``` -Пояснение: +#### Пояснение: Для **ssh forwarding** используются: [(Подробнее)](https://docs.gitea.io/en-us/install-with-docker/#ssh-container-passthrough) @@ -45,4 +65,37 @@ sudo chmod +x /usr/local/bin/gitea Лучше всего расскажет [оф. дока](https://docs.drone.io/server/provider/gitea/) -Есть готовый [Docker-compose](docker/docker-compose/drone.md) \ No newline at end of file +### `docker-compose.yml`: +```yaml +version: "3.3" + +services: + drone: + image: drone/drone + restart: always + environment: + DRONE_GITEA_CLIENT_ID: "gitea_oauth_client_id" + DRONE_GITEA_CLIENT_SECRET: "gitea_oauth_client_secret" + DRONE_GITEA_SERVER: "https://gitea.example.com" + DRONE_RPC_SECRET: "drone_rpc_secret" + DRONE_SERVER_HOST: "drone.example.com" + DRONE_SERVER_PROTO: "https" + DRONE_USER_CREATE: "username:gitea_admin_username,admin:true" + ports: + - "127.0.0.1:3001:80" + volumes: + - "./data:/data" + + drone-runner: + image: drone/drone-runner-docker + restart: always + environment: + DRONE_RUNNER_NAME: "runner-01" + DRONE_RUNNER_CAPACITY: "10" + DRONE_RPC_SECRET: "drone_rpc_secret" + DRONE_RPC_HOST: "drone.example.com" + DRONE_RPC_PROTO: "https" + volumes: + - "/var/run/docker.sock:/var/run/docker.sock" +``` +***Заменить `drone_*`, `gitea_*` и `*.example.com` на ваши значения** \ No newline at end of file