commit 0e21e8bf7509fd1aa03843338f0472d0b9d4c85e Author: Lunny Xiao Date: Sun Aug 11 14:46:59 2019 +0800 init diff --git a/README.md b/README.md new file mode 100644 index 0000000..3c22095 --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +# drone docker compose file + + diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..8ac4846 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,35 @@ +version: '2' + +services: + drone-server: + image: drone/drone:1 + volumes: + - ./:/data + - /var/run/docker.sock:/var/run/docker.sock + restart: always + environment: + - DRONE_SERVER_HOST=${DRONE_SERVER_HOST} + - DRONE_SERVER_PROTO=${DRONE_SERVER_PROTO} + - DRONE_TLS_AUTOCERT=${DRONE_TLS_AUTOCERT} + # Gitea Config + - DRONE_GITEA_SERVER=${DRONE_GITEA_SERVER} + - DRONE_GITEA_CLIENT_ID=${DRONE_GITEA_CLIENT_ID} + - DRONE_GITEA_CLIENT_SECRET=${DRONE_GITEA_CLIENT_SECRET} + - DRONE_LOGS_PRETTY=true + - DRONE_LOGS_COLOR=true + - DRONE_AGENTS_ENABLED=${DRONE_AGENTS_ENABLED} + - DRONE_RPC_SECRET=${DRONE_RPC_SECRET} + - DRONE_GIT_ALWAYS_AUTH=${DRONE_GIT_ALWAYS_AUTH} + - DRONE_USER_CREATE=username:lunny,admin:true + networks: + - web + logging: + options: + max-size: "100k" + max-file: "3" + labels: + - "traefik.docker.network=web" + - "traefik.enable=true" + - "traefik.basic.frontend.rule=Host:${DRONE_SERVER_HOST}" + - "traefik.basic.port=80" + - "traefik.basic.protocol=http"