version: "2" services: # GITEA gitea-web: image: gitea/gitea:1.16.9 container_name: gitea restart: always env_file: - ./.env environment: - USER_UID=1000 - USER_GID=1000 - GITEA__database__DB_TYPE=postgres - GITEA__database__HOST=gitea-db:5432 - GITEA__database__NAME=${POSTGRES_DB} - GITEA__database__USER=${POSTGRES_USER} - GITEA__database__PASSWD=${POSTGRES_PASSWORD} networks: - gitea volumes: - ./gitea:/data/gitea - ./config:/etc/gitea - /etc/timezone:/etc/timezone:ro - /etc/localtime:/etc/localtime:ro ports: - "3000:3000" - "${GITEA_SSH_PORT}:22" depends_on: - gitea-db gitea-db: image: postgres:14 container_name: gitea-db restart: always env_file: - ./.env environment: - POSTGRES_USER=${POSTGRES_USER} - POSTGRES_PASSWORD=${POSTGRES_PASSWORD} - POSTGRES_DB=${POSTGRES_DB} networks: - gitea volumes: - ./postgres:/var/lib/postgresql/data # DRONE SERVER drone-server: image: drone/drone:2.16 container_name: drone-server ports: - "3001:80" - "9001:9000" volumes: - ./volumes/drone-srv:/var/lib/drone/ restart: always environment: - DRONE_OPEN=true - DRONE_SERVER_HOST=drone.${DOMAIN} - DRONE_GITEA=true - DRONE_GITEA_SERVER=${DRONE_GITEA_SERVER} - DRONE_NETWORK=gitea - DRONE_GITEA_SKIP_VERIFY=true - DRONE_TLS_AUTOCERT=false - DRONE_GITEA_GIT_USERNAME=${DRONE_GITEA_GIT_USERNAME} - DRONE_GITEA_GIT_PASSWORD=${DRONE_GITEA_GIT_PASSWORD} - DRONE_GIT_USERNAME=${DRONE_GITEA_GIT_USERNAME} - DRONE_GIT_PASSWORD=${DRONE_GITEA_GIT_PASSWORD} - DRONE_RPC_SECRET=${DRONE_RPC_SECRET} - DRONE_GITEA_CLIENT_ID=${DRONE_GITEA_CLIENT_ID} - DRONE_GITEA_CLIENT_SECRET=${DRONE_GITEA_CLIENT_SECRET} - DRONE_ADMIN=${DRONE_GITEA_GIT_USERNAME} - DRONE_USER_CREATE="username:${DRONE_GITEA_GIT_USERNAME},machine:false,admin:true,token:${DRONE_RPC_SECRET}" - DRONE_SERVER_PROTO=https networks: - gitea # DRONE RUNNER drone-runner: image: drone/drone-runner-docker:1.8.2 container_name: drone-runner restart: always depends_on: - drone-server volumes: - /var/run/docker.sock:/var/run/docker.sock - ./drone-runner:/drone/src environment: - DRONE_RPC_HOST=drone.${DOMAIN} - DRONE_RPC_SECRET=${DRONE_RPC_SECRET} - DRONE_RPC_PROTO=https - DRONE_RUNNER_NAME="drone-runner" - DRONE_RUNNER_CAPACITY=2 - DRONE_RUNNER_VOLUMES=/var/run/docker.sock:/var/run/docker.sock ports: - "3002:3000" networks: - gitea volumes: gitea-db: drone-srv: drone-runner: networks: gitea: name: gitea