🔥码云GVP开源项目 12k star Uniapp+ElementUI 功能强大 支持多语言、二开方便! 广告
Docker Compose版本 ~~~ version: '2' services: gogs: image: gogs/gogs:latest ports: - "10022:22" - 3000:3000 volumes: - /vagrant/gogs-data:/data restart: always mysql: image: mysql:latest ports: - 3306:3306 volumes: - /vagrant/mysql-data:/var/lib/mysql restart: always environment: - MYSQL_ROOT_PASSWORD=${your_password} - MYSQL_DATABASE=gogs drone-server: image: drone/drone:latest ports: - 8000:8000 - 9000:9000 volumes: - /var/lib/drone:/var/lib/drone restart: always environment: # 开启注册,此配置允许任何人自注册和登录系统 - DRONE_OPEN=true #直接配置172.17.32.212:9000 会报错 - DRONE_HOST=http://172.17.32.212:9000 # 设置管理员用户 - DRONE_ADMIN=admin # 开启Gogs驱动 - DRONE_GOGS=true # Gogs服务器地址 - DRONE_GOGS_URL=http://172.17.32.212:3000 # 此SECRET为任意值 - DRONE_SECRET=YeNmPSFyl090RMy4 drone-agent: image: drone/agent:latest command: agent restart: always depends_on: - drone-server volumes: - /var/run/docker.sock:/var/run/docker.sock environment: # Drone Server 地址,无需加http:// - DRONE_SERVER=172.17.32.212:9000 # 与Drone Server一致即可 - DRONE_SECRET=YeNmPSFyl090RMy4 ~~~ 启动: ~~~shell docker-compose up -d ~~~ gogs http://127.0.0.1:10080 drone http://127.0.0.1:10081