diff --git a/labs/gitea/.env b/labs/gitea/.env new file mode 100644 index 00000000..66b79e86 --- /dev/null +++ b/labs/gitea/.env @@ -0,0 +1,2 @@ +TZ=Asia/Shanghai +IP=192.168.100.144 \ No newline at end of file diff --git a/labs/gitea/.gitignore b/labs/gitea/.gitignore new file mode 100644 index 00000000..c225f2a6 --- /dev/null +++ b/labs/gitea/.gitignore @@ -0,0 +1,3 @@ +.vscode +log +data \ No newline at end of file diff --git a/labs/gitea/docker-compose.yml b/labs/gitea/docker-compose.yml new file mode 100644 index 00000000..ebf7574f --- /dev/null +++ b/labs/gitea/docker-compose.yml @@ -0,0 +1,51 @@ +#bash +version: "3.8" +services: + gitea: + image: gitea/gitea:1.14.2 + restart: always + ports: + - 3000:3000 + - 3022:22 + volumes: + - /etc/timezone:/etc/timezone:ro + - /etc/localtime:/etc/localtime:ro + - ./data/gitea:/data + #https://docs.drone.io/server/provider/gitea/ + drone: + image: drone/drone:2.0.0 + restart: always + ports: + - 9080:80 + - 9443:443 + environment: + - DRONE_GITEA_SERVER=http://${IP}:3000 + - DRONE_GITEA_CLIENT_ID=a8cc74a6-c4f8-461b-a8fe-752a17dfa162 + - DRONE_GITEA_CLIENT_SECRET=P_DVOLwB4eP4rmhhsmbIN4Jg_dUs8dwvWfemr9MF_UE= + - DRONE_RPC_SECRET=bea26a2221fd8090ea38720fc445eca6 + - DRONE_SERVER_HOST=${IP}:9080 + - DRONE_SERVER_PROTO=http + volumes: + - /etc/timezone:/etc/timezone:ro + - /etc/localtime:/etc/localtime:ro + - ./data/drone:/data + depends_on: + - gitea + drone-runner-docker: + image: drone/drone-runner-docker:1.6.3 + #restart: always + privileged: true + ports: + - 3001:3000 + environment: + - DRONE_RPC_PROTO=http + - DRONE_RPC_HOST=${IP}:9080 + - DRONE_RPC_SECRET=bea26a2221fd8090ea38720fc445eca6 + - DRONE_RUNNER_CAPACITY=2 + - DRONE_RUNNER_NAME=http://${IP}:3001 + volumes: + - /etc/timezone:/etc/timezone:ro + - /etc/localtime:/etc/localtime:ro + - /var/run/docker.sock:/var/run/docker.sock + depends_on: + - drone diff --git a/labs/gitlab/.env b/labs/gitlab/.env new file mode 100644 index 00000000..66b79e86 --- /dev/null +++ b/labs/gitlab/.env @@ -0,0 +1,2 @@ +TZ=Asia/Shanghai +IP=192.168.100.144 \ No newline at end of file diff --git a/labs/gitlab/.gitignore b/labs/gitlab/.gitignore new file mode 100644 index 00000000..c225f2a6 --- /dev/null +++ b/labs/gitlab/.gitignore @@ -0,0 +1,3 @@ +.vscode +log +data \ No newline at end of file diff --git a/labs/gitlab/docker-compose.yml b/labs/gitlab/docker-compose.yml new file mode 100644 index 00000000..51a55642 --- /dev/null +++ b/labs/gitlab/docker-compose.yml @@ -0,0 +1,37 @@ +version: "3.8" +services: + #https://docs.gitlab.com/omnibus/docker/#install-gitlab-using-docker-compose + #https://github.com/sameersbn/docker-gitlab/blob/master/docker-compose.yml + gitlab: + image: gitlab/gitlab-ce:13.12.0-ce.0 + restart: always + privileged: true + hostname: ${IP} + environment: + TZ: ${TZ} + GITLAB_ROOT_PASSWORD: aA123456! + GITLAB_OMNIBUS_CONFIG: | + external_url 'http://${IP}' + gitlab_rails['time_zone'] = 'Asia/Shanghai' + ports: + - 9080:80 + #- 9443:443 + #- 9022:22 + volumes: + - ./data/gitlab/etc:/etc/gitlab + - ./data/gitlab/log:/var/log/gitlab + - ./data/gitlab/opt:/var/opt/gitlab + #https://docs.gitlab.com/runner/register/index.html#docker + #http://localhost:9080/admin/runners + #gitlab-runner register + gitlab-runner: + image: gitlab/gitlab-runner:alpine-v13.12.0 + restart: always + privileged: true + environment: + TZ: ${TZ} + volumes: + - /var/run/docker.sock:/var/run/docker.sock + - ./data/gitlab-runner:/etc/gitlab-runner + depends_on: + - gitlab