56 lines
2.1 KiB
YAML
56 lines
2.1 KiB
YAML
version: '3.8'
|
|
|
|
services:
|
|
woodpecker-server:
|
|
image: woodpeckerci/woodpecker-server:v3
|
|
container_name: woodpecker-server
|
|
user: "0:0"
|
|
restart: always
|
|
ports:
|
|
# Bind only to localhost (127.0.0.1) on port 8001 so it's not publicly accessible directly
|
|
- "127.0.0.1:8001:8000"
|
|
environment:
|
|
# The public address of your Woodpecker CI instance (e.g. http://16.113.57.127:8000)
|
|
- WOODPECKER_HOST=http://16.113.57.127:8000
|
|
|
|
# Disable open registration (requires users to be explicitly allowed)
|
|
- WOODPECKER_OPEN=false
|
|
|
|
# Initial administrator account (e.g. your GitHub username)
|
|
- WOODPECKER_ADMIN=tripro-lab
|
|
|
|
# Restrict login to members of these GitHub organizations/users (comma-separated list)
|
|
- WOODPECKER_ORGS=tripro-lab
|
|
|
|
# Shared secret between server and agent (Generate one using: openssl rand -hex 32)
|
|
- WOODPECKER_AGENT_SECRET=ba33ff589a3b7f36ebb4b8c30eab29573d038adb2c64f3dab3ed5ae384d7f70e
|
|
|
|
# GitHub OAuth Configuration (Create app in Github -> Developer Settings -> OAuth Apps)
|
|
- WOODPECKER_GITHUB=true
|
|
- WOODPECKER_GITHUB_CLIENT=Ov23liXzCGU0K7rytPN2
|
|
- WOODPECKER_GITHUB_SECRET=b915489c7ed2e149517b712f969f386bd2e8b2b4
|
|
|
|
# Database Configuration (MySQL Option B)
|
|
- WOODPECKER_DATABASE_DRIVER=mysql
|
|
- WOODPECKER_DATABASE_DATASOURCE=your_mysql_user:your_mysql_password@tcp(your_mysql_host:3306)/your_mysql_db_name?parseTime=true
|
|
volumes:
|
|
- woodpecker-server-data:/var/lib/woodpecker
|
|
|
|
woodpecker-agent:
|
|
image: woodpeckerci/woodpecker-agent:v3
|
|
container_name: woodpecker-agent
|
|
restart: always
|
|
depends_on:
|
|
- woodpecker-server
|
|
environment:
|
|
- WOODPECKER_SERVER=woodpecker-server:9000
|
|
# Must match the exact same secret defined in woodpecker-server above
|
|
- WOODPECKER_AGENT_SECRET=ba33ff589a3b7f36ebb4b8c30eab29573d038adb2c64f3dab3ed5ae384d7f70e
|
|
# Let the agent run Docker builds
|
|
- WOODPECKER_BACKEND=docker
|
|
volumes:
|
|
- /var/run/docker.sock:/var/run/docker.sock
|
|
|
|
volumes:
|
|
woodpecker-server-data:
|
|
driver: local
|