Last active
August 1, 2022 11:50
-
-
Save ruanbekker/27d2cb2e3f4194ee5cfe2bcdc9c4bf52 to your computer and use it in GitHub Desktop.
Gitea and Drone on Docker for Blog Post: https://blog.ruanbekker.com/blog/2020/02/04/setup-gitea-and-drone-on-docker-2020-edition/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: "3.7" | |
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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
I fixed with this:
DRONE_GIT_ALWAYS_AUTH=true
Best regards,
Dgzt