mirror of
https://github.com/vimagick/dockerfiles.git
synced 2025-01-30 05:39:31 +02:00
update gogs
This commit is contained in:
parent
74d71f87b5
commit
1c4ee2591c
@ -5,43 +5,36 @@ drone
|
||||
|
||||
## github
|
||||
|
||||
```yaml
|
||||
drone:
|
||||
image: drone/drone:1.5-linux-amd64
|
||||
ports:
|
||||
- "8080:80"
|
||||
volumes:
|
||||
- ./data:/data
|
||||
environment:
|
||||
- DRONE_AGENTS_ENABLED=true
|
||||
- DRONE_SERVER_PROTO=http
|
||||
- DRONE_SERVER_HOST=drone.easypi.pro
|
||||
- DRONE_RPC_SECRET=secret
|
||||
- DRONE_GITHUB_SERVER=https://github.com
|
||||
- DRONE_GITHUB_CLIENT_ID=xxxxxx
|
||||
- DRONE_GITHUB_CLIENT_SECRET=xxxxxx
|
||||
restart: always
|
||||
```
|
||||
|
||||
```yaml
|
||||
#
|
||||
# Github » Settings » Applications » Developer applications » Register new application
|
||||
#
|
||||
Application name: drone
|
||||
Homepage URL: http://drone.easypi.info/
|
||||
Homepage URL: http://drone.easypi.pro/
|
||||
Application description: Drone is a Continuous Integration platform built on Docker, written in Go
|
||||
Authorization callback URL: http://drone.easypi.info/authorize
|
||||
Authorization callback URL: http://drone.easypi.pro/authorize
|
||||
Client ID: ... (generated by github)
|
||||
Client Secret: ... (generated by github)
|
||||
```
|
||||
|
||||
## docker-compose.yml
|
||||
|
||||
```yaml
|
||||
drone:
|
||||
image: drone/drone
|
||||
ports:
|
||||
- "8000:8000"
|
||||
volumes:
|
||||
- ./drone:/var/lib/drone
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
environment:
|
||||
- REMOTE_DRIVER=github
|
||||
- REMOTE_CONFIG=https://github.com?client_id=...&client_secret=...
|
||||
# - REMOTE_DRIVER=gogs
|
||||
# - REMOTE_CONFIG=https://git.easypi.info/?open=false
|
||||
- DEBUG=false
|
||||
restart: always
|
||||
|
||||
wall:
|
||||
image: drone/drone-wall
|
||||
ports:
|
||||
- "8080:80"
|
||||
restart: always
|
||||
```
|
||||
|
||||
> Drone will register gogs webhooks automatically, you don't need to do it manually.
|
||||
|
||||
## nginx/sites-enabled/drone
|
||||
@ -49,7 +42,7 @@ wall:
|
||||
```
|
||||
server {
|
||||
listen 80;
|
||||
server_name drone.easypi.info;
|
||||
server_name drone.easypi.pro;
|
||||
location / {
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $remote_addr;
|
||||
@ -57,7 +50,7 @@ server {
|
||||
proxy_set_header Host $http_host;
|
||||
proxy_set_header Origin "";
|
||||
|
||||
proxy_pass http://127.0.0.1:8000;
|
||||
proxy_pass http://127.0.0.1:8080;
|
||||
proxy_redirect off;
|
||||
proxy_http_version 1.1;
|
||||
proxy_buffering off;
|
||||
@ -65,14 +58,6 @@ server {
|
||||
chunked_transfer_encoding off;
|
||||
}
|
||||
}
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
server_name wall.easypi.info;
|
||||
location / {
|
||||
proxy_pass http://127.0.0.1:8080;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## up and running
|
||||
@ -81,13 +66,10 @@ server {
|
||||
# server
|
||||
$ cd ~/fig/drone/
|
||||
$ docker-compose up -d
|
||||
$ docker-compose logs
|
||||
$ docker-compose logs -f
|
||||
|
||||
# client (login with remote driver credential)
|
||||
$ firefox http://drone.easypi.info/
|
||||
|
||||
# dashboard
|
||||
$ firefox http://wall.easypi.info/
|
||||
$ firefox http://drone.easypi.pro/
|
||||
```
|
||||
|
||||
[1]: http://readme.drone.io/usage/overview/
|
||||
[1]: https://readme.drone.io
|
||||
|
@ -1,23 +0,0 @@
|
||||
#
|
||||
# Dockerfile for drone-arm
|
||||
#
|
||||
|
||||
FROM easypi/alpine-arm
|
||||
MAINTAINER EasyPi Software Foundation
|
||||
|
||||
RUN apk add --no-cache ca-certificates
|
||||
|
||||
ADD drone /drone
|
||||
|
||||
ENV DATABASE_DRIVER=sqlite3 \
|
||||
DATABASE_CONFIG=/var/lib/drone/drone.sqlite \
|
||||
GODEBUG=netdns=go \
|
||||
XDG_CACHE_HOME=/var/lib/drone
|
||||
|
||||
VOLUME $XDG_CACHE_HOME
|
||||
WORKDIR $XDG_CACHE_HOME
|
||||
|
||||
EXPOSE 8000
|
||||
|
||||
ENTRYPOINT ["/drone"]
|
||||
CMD ["server"]
|
@ -1,24 +1,6 @@
|
||||
drone-arm
|
||||
=========
|
||||
|
||||
```yaml
|
||||
drone:
|
||||
image: armdrone/drone
|
||||
ports:
|
||||
- "8000:80"
|
||||
volumes:
|
||||
- ./data:/var/lib/drone
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
environment:
|
||||
- REMOTE_DRIVER=gogs
|
||||
- REMOTE_CONFIG=http://git.easypi.info:3000/?open=false
|
||||
- PLUGIN_FILTER=armdrone/*
|
||||
- GIN_MODE=release
|
||||
extra_hosts:
|
||||
- git.easypi.info:192.168.31.231
|
||||
restart: always
|
||||
```
|
||||
|
||||
## Deploy Key Setup
|
||||
|
||||
```yaml
|
||||
|
@ -1,45 +1,49 @@
|
||||
version: '2'
|
||||
version: '3.7'
|
||||
|
||||
services:
|
||||
drone-server:
|
||||
image: quay.io/armswarm/drone:0.8
|
||||
drone:
|
||||
image: drone/drone:1.5-linux-arm
|
||||
ports:
|
||||
- "8000:8000"
|
||||
- "9000:9000"
|
||||
- "8080:80"
|
||||
volumes:
|
||||
- ./data/drone:/var/lib/drone
|
||||
- ./data/drone:/data
|
||||
environment:
|
||||
- DRONE_OPEN=true
|
||||
- DRONE_HOST=https://drone.easypi.pro
|
||||
- DRONE_DATABASE_DRIVER=mysql
|
||||
- DRONE_DATABASE_DATASOURCE=root:root@tcp(mariadb:3306)/drone?parseTime=true
|
||||
- DRONE_GOGS=true
|
||||
- DRONE_GOGS_URL=https://gogs.easypi.pro
|
||||
- DRONE_SECRET=0123456789
|
||||
- DRONE_ADMIN=root
|
||||
- DRONE_SERVER_HOST=drone
|
||||
- DRONE_SERVER_PROTO=http
|
||||
- DRONE_RPC_SECRET=secret
|
||||
- DRONE_DATABASE_DRIVER=postgres
|
||||
- DRONE_DATABASE_DATASOURCE=postgres://drone:drone@postgres:5432/drone?sslmode=disable
|
||||
- DRONE_GOGS_SERVER=http://gogs:3000
|
||||
- DRONE_AGENTS_ENABLED=true
|
||||
depends_on:
|
||||
- mariadb
|
||||
- postgres
|
||||
- gogs
|
||||
restart: always
|
||||
|
||||
drone-agent:
|
||||
image: drone/agent:linux-arm
|
||||
agent:
|
||||
image: drone/agent:1.5-linux-arm
|
||||
volumes:
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
environment:
|
||||
- DRONE_SERVER=drone-server:9000
|
||||
- DRONE_SECRET=0123456789
|
||||
- DRONE_RPC_PROTO=http
|
||||
- DRONE_RPC_HOST=drone
|
||||
- DRONE_RPC_SECRET=secret
|
||||
- DRONE_RUNNER_NAME=agent
|
||||
- DRONE_RUNNER_CAPACITY=2
|
||||
depends_on:
|
||||
- drone-server
|
||||
- drone
|
||||
restart: always
|
||||
|
||||
mariadb:
|
||||
image: easypi/mariadb-arm
|
||||
postgres:
|
||||
image: arm32v7/postgres:12-alpine
|
||||
ports:
|
||||
- "3306:3306"
|
||||
- "5432:5432"
|
||||
volumes:
|
||||
- ./data/postgres:/var/lib/postgresql/data
|
||||
environment:
|
||||
- MYSQL_ROOT_PASSWORD=root
|
||||
- MYSQL_DATABASE=drone
|
||||
- POSTGRES_USER=drone
|
||||
- POSTGRES_PASSWORD=drone
|
||||
- POSTGRES_DB=drone
|
||||
restart: always
|
||||
|
||||
gogs:
|
||||
@ -50,12 +54,3 @@ services:
|
||||
volumes:
|
||||
- ./data/gogs:/data
|
||||
restart: always
|
||||
|
||||
phpmyadmin:
|
||||
image: easypi/phpmyadmin-arm
|
||||
ports:
|
||||
- "8080:80"
|
||||
environment:
|
||||
- PMA_HOST=mariadb
|
||||
- PMA_PORT=3306
|
||||
restart: always
|
||||
|
BIN
drone/arm/drone
BIN
drone/arm/drone
Binary file not shown.
@ -1,18 +1,56 @@
|
||||
drone:
|
||||
image: drone/drone
|
||||
ports:
|
||||
- "8000:80"
|
||||
volumes:
|
||||
- ./data:/var/lib/drone
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
environment:
|
||||
- REMOTE_DRIVER=gogs
|
||||
- REMOTE_CONFIG=http://git.easypi.info:3000/?open=false
|
||||
- DEBUG=false
|
||||
restart: always
|
||||
version: '3.7'
|
||||
|
||||
wall:
|
||||
image: drone/drone-wall
|
||||
ports:
|
||||
- "8080:80"
|
||||
restart: always
|
||||
services:
|
||||
drone:
|
||||
image: drone/drone:1.5-linux-amd64
|
||||
ports:
|
||||
- "8080:80"
|
||||
volumes:
|
||||
- ./data/drone:/data
|
||||
environment:
|
||||
- DRONE_SERVER_HOST=drone
|
||||
- DRONE_SERVER_PROTO=http
|
||||
- DRONE_RPC_SECRET=secret
|
||||
- DRONE_DATABASE_DRIVER=postgres
|
||||
- DRONE_DATABASE_DATASOURCE=postgres://drone:drone@postgres:5432/drone?sslmode=disable
|
||||
- DRONE_GOGS_SERVER=http://gogs:3000
|
||||
- DRONE_AGENTS_ENABLED=true
|
||||
depends_on:
|
||||
- postgres
|
||||
- gogs
|
||||
restart: always
|
||||
|
||||
agent:
|
||||
image: drone/agent:1.5-linux-amd64
|
||||
volumes:
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
environment:
|
||||
- DRONE_RPC_PROTO=http
|
||||
- DRONE_RPC_HOST=drone
|
||||
- DRONE_RPC_SECRET=secret
|
||||
- DRONE_RUNNER_NAME=agent
|
||||
- DRONE_RUNNER_CAPACITY=2
|
||||
depends_on:
|
||||
- drone
|
||||
restart: always
|
||||
|
||||
postgres:
|
||||
image: postgres:12-alpine
|
||||
ports:
|
||||
- "5432:5432"
|
||||
volumes:
|
||||
- ./data/postgres:/var/lib/postgresql/data
|
||||
environment:
|
||||
- POSTGRES_USER=drone
|
||||
- POSTGRES_PASSWORD=drone
|
||||
- POSTGRES_DB=drone
|
||||
restart: always
|
||||
|
||||
gogs:
|
||||
image: gogs/gogs
|
||||
ports:
|
||||
- "2222:22"
|
||||
- "3000:3000"
|
||||
volumes:
|
||||
- ./data/gogs:/data
|
||||
restart: always
|
||||
|
@ -38,4 +38,7 @@ $ tree -FL 3 ./data/git/
|
||||
└── user2/
|
||||
```
|
||||
|
||||
Please read [this][2] to learn more about `app.ini`.
|
||||
|
||||
[1]: https://gogs.io/
|
||||
[2]: https://gogs.io/docs/advanced/configuration_cheat_sheet.html
|
||||
|
Loading…
x
Reference in New Issue
Block a user