测试Docker脚本 2021-05-17

version: "3.4"
services:
  gitea:
    image: gitea/gitea:1.10.3
    #image: gitea/gitea:latest
    container_name: gitea
    environment:
      - APP_NAME=Gitea
      - USER_UID=1000
      - USER_GID=1000
      - ROOT_URL=http://gitea:3000
      - SSH_DOMAIN=gitea
      - SSH_PORT=2222
      - HTTP_PORT=3000
      - DB_TYPE=postgres
      - DB_HOST=gitea-db:5432
      - DB_NAME=gitea
      - DB_USER=postgres
      - DB_PASSWD=postgres
    restart: always
    volumes:
      - gitea:/data
    ports:
      - "3000:3000"
      - "2222:22"
    networks:
      - appnet

  gitea-db:
    image: postgres:alpine
    container_name: gitea-db
    restart: always
    volumes:
      - gitea-db:/var/lib/postgresql/data
    environment:
      - POSTGRES_USER=postgres
      - POSTGRES_PASSWORD=postgres
      - POSTGRES_DB=gitea
    networks:
      - appnet

  drone-server:
    image: drone/drone:1.2.1
    #image: ruanbekker/drone-server:basic-auth-1.2.1
    container_name: drone-server
    ports:
      - 80:80
      - 9000
    volumes:
      - drone:/var/lib/drone/
    restart: always
    depends_on:
      - gitea
    environment:
      - DRONE_OPEN=true
      - DRONE_GITEA=true
      - DRONE_NETWORK=appnet
      - DRONE_DEBUG=true
      - DRONE_ADMIN=rbekker87
      - DRONE_USER_CREATE=username:rbekker87,admin:true
      - DRONE_SERVER_PORT=:80
      - DRONE_DATABASE_DRIVER=postgres
      - DRONE_DATABASE_DATASOURCE=postgres://postgres:postgres@gitea-db:5432/postgres?sslmode=disable
      - DRONE_GIT_ALWAYS_AUTH=false
      - DRONE_GITEA_SERVER=http://gitea:3000
      - DRONE_RPC_SECRET=9c3921e3e748aff725d2e16ef31fbc42
      - DRONE_SERVER_HOST=drone-server:80
      - DRONE_HOST=http://drone-server:80
      - DRONE_SERVER_PROTO=http
      - DRONE_TLS_AUTOCERT=false
      - DRONE_AGENTS_ENABLED=true
    networks:
      - appnet

  drone-agent:
    image: drone/agent:1.2.1
    #image: ruanbekker/drone-agent:basic-auth-1.2.1
    container_name: drone-agent
    command: agent
    restart: always
    depends_on:
      - drone-server
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
      - drone-agent:/data
    environment:
      - DRONE_RPC_SERVER=http://drone-server:80
      - DRONE_RPC_SECRET=9c3921e3e748aff725d2e16ef31fbc42
      - DRONE_RUNNER_CAPACITY=1
      - DRONE_RUNNER_NETWORKS=appnet
    networks:
      - appnet

volumes:
  gitea: {}
  gitea-db: {}
  drone: {}
  drone-agent: {}

networks:
  appnet:
    name: appnet

你可能感兴趣的:(测试Docker脚本 2021-05-17)