parent
ecd7a4a9c4
commit
2eb2505a98
@ -1,79 +1,110 @@ |
||||
version: "2" |
||||
|
||||
services: |
||||
gitea-app: |
||||
image: gitea/gitea:latest |
||||
container_name: gitea-app |
||||
|
||||
# GITEA |
||||
gitea-web: |
||||
image: gitea/gitea:1.16.9 |
||||
container_name: gitea |
||||
restart: always |
||||
env_file: |
||||
- ./.env |
||||
environment: |
||||
- USER_UID=1000 |
||||
- USER_GID=1000 |
||||
- ROOT_URL=http://gitea:3000 |
||||
- SSH_DOMAIN=mydomain.com |
||||
restart: always |
||||
- 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: |
||||
- ./volumes/gitea_app:/data |
||||
- ./gitea:/data |
||||
- ./config:/etc/gitea |
||||
- /etc/timezone:/etc/timezone:ro |
||||
- /etc/localtime:/etc/localtime:ro |
||||
ports: |
||||
- "3000:3000" |
||||
- "22:22" |
||||
networks: |
||||
- gitea |
||||
- "${SSH_PORT}:22" |
||||
depends_on: |
||||
- gitea-db |
||||
|
||||
gitea-db: |
||||
image: postgres:alpine |
||||
image: postgres:14 |
||||
container_name: gitea-db |
||||
ports: |
||||
- 5440:5432 |
||||
restart: always |
||||
volumes: |
||||
- ./volumes/gitea_db:/var/lib/postgresql/data |
||||
env_file: |
||||
- ./.env |
||||
environment: |
||||
- POSTGRES_USER=postgres |
||||
- POSTGRES_PASSWORD=postgres |
||||
- POSTGRES_DB=gitea |
||||
- 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:0.8 |
||||
image: drone/drone:2.16 |
||||
container_name: drone-server |
||||
ports: |
||||
- 80:8000 |
||||
- 9000 |
||||
- "3001:80" |
||||
- "9001:9000" |
||||
volumes: |
||||
- ./volumes/drone-srv:/var/lib/drone/ |
||||
restart: always |
||||
depends_on: |
||||
- gitea |
||||
environment: |
||||
- DRONE_OPEN=true |
||||
- DRONE_HOST=http://drone-server:8000 |
||||
- DRONE_SERVER_HOST=drone.${DOMAIN} |
||||
- DRONE_GITEA=true |
||||
- DRONE_GITEA_URL=http://gitea:3000 |
||||
- DRONE_SECRET=secret |
||||
- 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_ADMIN} |
||||
- DRONE_USER_CREATE="username:${DRONE_GITEA_GIT_USERNAME},machine:false,admin:true,token:${DRONE_RPC_SECRET}" |
||||
- DRONE_SERVER_PROTO=https |
||||
networks: |
||||
- gitea |
||||
|
||||
drone-agent: |
||||
image: drone/agent:0.8 |
||||
container_name: drone-agent |
||||
command: agent |
||||
# 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_SERVER=drone-server:9000 |
||||
- DRONE_SECRET=secret |
||||
- 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-app: |
||||
gitea-db: |
||||
drone-srv: |
||||
drone-runner: |
||||
|
||||
networks: |
||||
gitea: |
||||
external: true |
||||
name: gitea |
Loading…
Reference in new issue