[Docs] Simplify docker-compose samples (#356)

This commit is contained in:
Anbraten 2021-09-28 00:04:52 +02:00 committed by GitHub
parent f81bd8c656
commit 3f03052190
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 175 additions and 303 deletions

View file

@ -95,23 +95,12 @@ This is the reference list of all environment variables available to your build
If you want specific environment variables to be available in all of your builds use the `WOODPECKER_ENVIRONMENT` setting on the Woodpecker server.
```.env
WOODPECKER_ENVIRONMENT=first_var:value1,second_var:value2
```
```.diff
services:
woodpecker-server:
image: woodpeckerci/woodpecker-server:latest
[...]
environment:
- WOODPECKER_OPEN=true
- WOODPECKER_ORGS=dolores,dogpatch
- WOODPECKER_ADMIN=johnsmith,janedoe
- WOODPECKER_HOST=${WOODPECKER_HOST}
- WOODPECKER_GITHUB=true
- WOODPECKER_GITHUB_CLIENT=${WOODPECKER_GITHUB_CLIENT}
- WOODPECKER_GITHUB_SECRET=${WOODPECKER_GITHUB_SECRET}
- WOODPECKER_SECRET=${WOODPECKER_SECRET}
- [...]
+ - WOODPECKER_ENVIRONMENT=first_var:value1,second_var:value2
```

View file

@ -12,9 +12,9 @@ A Woodpecker deployment consists of two parts:
## Installation
You can install Woodpecker [images](/docs/downloads#docker-images) on multiple ways:
- Using [docker-compose](https://docs.docker.com/compose/)
- By deploying to a [Kubernetes](/docs/administration/kubernetes) with manifests or a Helm charts
You can install Woodpecker on multiple ways:
- Using [docker-compose](/docs/administration/setup#docker-compose) with the official [docker images](/docs/downloads#docker-images)
- By deploying to a [Kubernetes](/docs/administration/kubernetes) with manifests or Woodpeckers official Helm charts
- Using [binaries](/docs/downloads)
### docker-compose
@ -61,27 +61,27 @@ volumes:
Woodpecker needs to know its own address. You must therefore provide the public address of it in `<scheme>://<hostname>` format. Please omit trailing slashes:
```diff
# docker-compose.yml
version: '3'
services:
woodpecker-server:
image: woodpeckerci/woodpecker-server:latest
[...]
environment:
- WOODPECKER_OPEN=true
- [...]
+ - WOODPECKER_HOST=${WOODPECKER_HOST}
- WOODPECKER_GITHUB=true
- WOODPECKER_GITHUB_CLIENT=${WOODPECKER_GITHUB_CLIENT}
- WOODPECKER_GITHUB_SECRET=${WOODPECKER_GITHUB_SECRET}
- WOODPECKER_SECRET=${WOODPECKER_SECRET}
```
As agents run pipeline steps as docker containers they require access to the host machine's Docker daemon:
```diff
# docker-compose.yml
version: '3'
services:
[...]
woodpecker-agent:
image: woodpeckerci/woodpecker-agent:latest
command: agent
restart: always
depends_on: [ woodpecker-server ]
[...]
+ volumes:
+ - /var/run/docker.sock:/var/run/docker.sock
```
@ -89,37 +89,32 @@ services:
Agents require the server address for agent-to-server communication:
```diff
# docker-compose.yml
version: '3'
services:
woodpecker-agent:
image: woodpeckerci/woodpecker-agent:latest
command: agent
restart: always
depends_on: [ woodpecker-server ]
volumes:
- /var/run/docker.sock:/var/run/docker.sock
[...]
environment:
+ - WOODPECKER_SERVER=woodpecker-server:9000
- WOODPECKER_SECRET=${WOODPECKER_SECRET}
```
The server and agents use a shared secret to authenticate communication. This should be a random string of your choosing and should be kept private. You can generate such string with `openssl rand -hex 32`:
```diff
# docker-compose.yml
version: '3'
services:
woodpecker-server:
image: woodpeckerci/woodpecker-server:latest
[...]
environment:
- WOODPECKER_OPEN=true
- WOODPECKER_HOST=${WOODPECKER_HOST}
- WOODPECKER_GITHUB=true
- WOODPECKER_GITHUB_CLIENT=${WOODPECKER_GITHUB_CLIENT}
- WOODPECKER_GITHUB_SECRET=${WOODPECKER_GITHUB_SECRET}
- [...]
+ - WOODPECKER_SECRET=${WOODPECKER_SECRET}
woodpecker-agent:
image: woodpeckerci/woodpecker-agent:latest
[...]
environment:
- WOODPECKER_SERVER=woodpecker-server:9000
- WOODPECKER_DEBUG=true
- [...]
+ - WOODPECKER_SECRET=${WOODPECKER_SECRET}
```

View file

@ -8,17 +8,17 @@ If registration is open every user with an account at the configured [SCM](docs/
This example enables open registration for users that are members of approved organizations:
```diff
# docker-compose.yml
version: '3'
services:
woodpecker-server:
image: woodpeckerci/woodpecker-server:latest
[...]
environment:
- [...]
+ - WOODPECKER_OPEN=true
+ - WOODPECKER_ORGS=dolores,dogpatch
- WOODPECKER_HOST=${WOODPECKER_HOST}
- WOODPECKER_GITHUB=true
- WOODPECKER_GITHUB_CLIENT=${WOODPECKER_GITHUB_CLIENT}
- WOODPECKER_GITHUB_SECRET=${WOODPECKER_GITHUB_SECRET}
- WOODPECKER_SECRET=${WOODPECKER_SECRET}
```
## Administrators
@ -26,18 +26,15 @@ services:
Administrators should also be enumerated in your configuration.
```diff
# docker-compose.yml
version: '3'
services:
woodpecker-server:
image: woodpeckerci/woodpecker-server:latest
[...]
environment:
- WOODPECKER_OPEN=true
- WOODPECKER_ORGS=dolores,dogpatch
- [...]
+ - WOODPECKER_ADMIN=johnsmith,janedoe
- WOODPECKER_HOST=${WOODPECKER_HOST}
- WOODPECKER_GITHUB=true
- WOODPECKER_GITHUB_CLIENT=${WOODPECKER_GITHUB_CLIENT}
- WOODPECKER_GITHUB_SECRET=${WOODPECKER_GITHUB_SECRET}
- WOODPECKER_SECRET=${WOODPECKER_SECRET}
```
## Filtering repositories
@ -47,18 +44,15 @@ Woodpecker operates with the user's OAuth permission. Due to the coarse permissi
Use the `WOODPECKER_REPO_OWNERS` variable to filter which GitHub user's repos should be synced only. You typically want to put here your company's GitHub name.
```diff
# docker-compose.yml
version: '3'
services:
woodpecker-server:
image: woodpeckerci/woodpecker-server:latest
[...]
environment:
- WOODPECKER_OPEN=true
- WOODPECKER_ORGS=dolores,dogpatch
- [...]
+ - WOODPECKER_REPO_OWNERS=mycompany,mycompanyossgithubuser
- WOODPECKER_HOST=${WOODPECKER_HOST}
- WOODPECKER_GITHUB=true
- WOODPECKER_GITHUB_CLIENT=${WOODPECKER_GITHUB_CLIENT}
- WOODPECKER_GITHUB_SECRET=${WOODPECKER_GITHUB_SECRET}
- WOODPECKER_SECRET=${WOODPECKER_SECRET}
```
## Global registry setting
@ -72,19 +66,8 @@ version: '3'
services:
woodpecker-server:
image: woodpeckerci/woodpecker-server:latest
ports:
- 80:8000
- 9000
volumes:
- woodpecker-server-data:/var/lib/drone/
restart: always
[...]
environment:
- WOODPECKER_OPEN=true
- WOODPECKER_HOST=${WOODPECKER_HOST}
- WOODPECKER_GITHUB=true
- WOODPECKER_GITHUB_CLIENT=${WOODPECKER_GITHUB_CLIENT}
- WOODPECKER_GITHUB_SECRET=${WOODPECKER_GITHUB_SECRET}
- WOODPECKER_SECRET=${WOODPECKER_SECRET}
- [...]
+ - WOODPECKER_DOCKER_CONFIG=/home/user/.docker/config.json
```

View file

@ -1,37 +1,22 @@
# GitHub
Woodpecker comes with built-in support for GitHub and GitHub Enterprise. To enable GitHub you should configure the Woodpecker container using the following environment variables:
Woodpecker comes with built-in support for GitHub and GitHub Enterprise. To enable GitHub you should configure the Woodpecker server using the following environment variables:
```diff
# docker-compose.yml
version: '3'
services:
woodpecker-server:
image: woodpeckerci/woodpecker-server:latest
ports:
- 80:8000
- 9000
volumes:
- /var/lib/drone:/var/lib/drone/
restart: always
[...]
environment:
- WOODPECKER_OPEN=true
- WOODPECKER_HOST=${WOODPECKER_HOST}
- [...]
+ - WOODPECKER_GITHUB=true
+ - WOODPECKER_GITHUB_CLIENT=${WOODPECKER_GITHUB_CLIENT}
+ - WOODPECKER_GITHUB_SECRET=${WOODPECKER_GITHUB_SECRET}
- WOODPECKER_SECRET=${WOODPECKER_SECRET}
woodpecker-agent:
image: woodpeckerci/woodpecker-agent:latest
restart: always
depends_on:
- woodpecker-server
volumes:
- /var/run/docker.sock:/var/run/docker.sock
environment:
- WOODPECKER_SERVER=woodpecker-server:9000
- WOODPECKER_SECRET=${WOODPECKER_SECRET}
[...]
```
## Registration
@ -46,35 +31,26 @@ Please use this screenshot for reference:
This is a full list of configuration options. Please note that many of these options use default configuration values that should work for the majority of installations.
`WOODPECKER_GITHUB=true`
: Set to true to enable the GitHub driver.
```shell
WOODPECKER_GITHUB=true # Set to true to enable the GitHub driver
`WOODPECKER_GITHUB_URL=https://github.com`
: GitHub server address.
WOODPECKER_GITHUB_URL=https://github.com # GitHub server address
`WOODPECKER_GITHUB_CLIENT`
: GitHub oauth2 client id.
WOODPECKER_GITHUB_CLIENT=... # GitHub oauth2 client id
`WOODPECKER_GITHUB_SECRET`
: GitHub oauth2 client secret.
WOODPECKER_GITHUB_SECRET=... # GitHub oauth2 client secret.
`WOODPECKER_GITHUB_SCOPE=repo,repo:status,user:email,read:org`
: Comma-separated GitHub oauth scope.
WOODPECKER_GITHUB_SCOPE=repo,repo:status,user:email,read:org # Comma-separated GitHub oauth scope.
`WOODPECKER_GITHUB_GIT_USERNAME`
: Optional. Use a single machine account username to clone all repositories.
WOODPECKER_GITHUB_GIT_USERNAME=... # Optional. Use a single machine account username to clone all repositories.
`WOODPECKER_GITHUB_GIT_PASSWORD`
: Optional. Use a single machine account password to clone all repositories.
WOODPECKER_GITHUB_GIT_PASSWORD=... # Optional. Use a single machine account password to clone all repositories.
`WOODPECKER_GITHUB_PRIVATE_MODE=false`
: Set to true if GitHub is running in private mode.
WOODPECKER_GITHUB_PRIVATE_MODE=false # Set to true if GitHub is running in private mode.
`WOODPECKER_GITHUB_MERGE_REF=true`
: Set to true to use the `refs/pulls/%d/merge` vs `refs/pulls/%d/head`
WOODPECKER_GITHUB_MERGE_REF=true # Set to true to use the `refs/pulls/%d/merge` vs `refs/pulls/%d/head`
`WOODPECKER_GITHUB_CONTEXT=continuous-integration/woodpecker`
: Customize the GitHub status message context
WOODPECKER_GITHUB_CONTEXT=continuous-integration/woodpecker # Customize the GitHub status message context
`WOODPECKER_GITHUB_SKIP_VERIFY=false`
: Set to true to disable SSL verification.
WOODPECKER_GITHUB_SKIP_VERIFY=false # Set to true to disable SSL verification
```

View file

@ -3,36 +3,21 @@
Woodpecker comes with built-in support for Gitea. To enable Gitea you should configure the Woodpecker container using the following environment variables:
```diff
# docker-compose.yml
version: '3'
services:
woodpecker-server:
image: woodpeckerci/woodpecker-server:latest
ports:
- 80:8000
- 9000
volumes:
- /var/lib/drone:/var/lib/drone/
restart: always
[...]
environment:
- WOODPECKER_OPEN=true
- WOODPECKER_HOST=${WOODPECKER_HOST}
- [...]
+ - WOODPECKER_GITEA=true
+ - WOODPECKER_GITEA_URL=${WOODPECKER_GITEA_URL}
+ - WOODPECKER_GITEA_CLIENT=${WOODPECKER_GITEA_CLIENT}
+ - WOODPECKER_GITEA_SECRET=${WOODPECKER_GITEA_SECRET}
- WOODPECKER_SECRET=${WOODPECKER_SECRET}
woodpecker-agent:
image: woodpeckerci/woodpecker-agent:latest
restart: always
depends_on:
- woodpecker-server
volumes:
- /var/run/docker.sock:/var/run/docker.sock
environment:
- WOODPECKER_SERVER=woodpecker-server:9000
- WOODPECKER_SECRET=${WOODPECKER_SECRET}
[...]
```
## Registration
@ -46,29 +31,22 @@ Register your application with Gitea to create your client id and secret. You ca
This is a full list of configuration options. Please note that many of these options use default configuration values that should work for the majority of installations.
`WOODPECKER_GITEA=true`
: Set to true to enable the Gitea driver.
```shell
WOODPECKER_GITEA=true # Set to true to enable the Gitea driver
`WOODPECKER_GITEA_URL=https://try.gitea.io`
: Gitea server address.
WOODPECKER_GITEA_URL=https://try.gitea.io # Gitea server address
`WOODPECKER_GITEA_CLIENT`
: Gitea oauth2 client id.
WOODPECKER_GITEA_CLIENT=... # Gitea oauth2 client id
`WOODPECKER_GITEA_SECRET`
: Gitea oauth2 client secret.
WOODPECKER_GITEA_SECRET=... # Gitea oauth2 client secret
`WOODPECKER_GITEA_CONTEXT=continuous-integration/woodpecker`
: Customize the Gitea status message context
WOODPECKER_GITEA_CONTEXT=continuous-integration/woodpecker # Customize the Gitea status message context
`WOODPECKER_GITEA_GIT_USERNAME`
: Optional. Use a single machine account username to clone all repositories.
WOODPECKER_GITEA_GIT_USERNAME=... # Optional. Use a single machine account username to clone all repositories.
`WOODPECKER_GITEA_GIT_PASSWORD`
: Optional. Use a single machine account password to clone all repositories.
WOODPECKER_GITEA_GIT_PASSWORD=... # Optional. Use a single machine account password to clone all repositories.
`WOODPECKER_GITEA_PRIVATE_MODE=true`
: Set to true if Gitea is running in private mode.
WOODPECKER_GITEA_PRIVATE_MODE=true # Set to true if Gitea is running in private mode.
`WOODPECKER_GITEA_SKIP_VERIFY=false`
: Set to true to disable SSL verification.
WOODPECKER_GITEA_SKIP_VERIFY=false # Set to true to disable SSL verification.
```

View file

@ -3,66 +3,46 @@
Woodpecker comes with built-in support for the GitLab version 8.2 and higher. To enable GitLab you should configure the Woodpecker container using the following environment variables:
```diff
version: '2'
# docker-compose.yml
version: '3'
services:
woodpecker-server:
image: woodpeckerci/woodpecker-server:latest
ports:
- 80:8000
- 9000
volumes:
- /var/lib/drone:/var/lib/drone/
restart: always
[...]
environment:
+ - WOODPECKER_GITLAB=true
+ - WOODPECKER_GITLAB_CLIENT=95c0282573633eb25e82
+ - WOODPECKER_GITLAB_SECRET=30f5064039e6b359e075
+ - WOODPECKER_GITLAB_URL=http://gitlab.mycompany.com
- WOODPECKER_SECRET=${WOODPECKER_SECRET}
woodpecker-agent:
image: woodpeckerci/woodpecker-agent:latest
restart: always
depends_on:
- woodpecker-server
volumes:
- /var/run/docker.sock:/var/run/docker.sock
environment:
- WOODPECKER_SERVER=woodpecker-server:9000
- WOODPECKER_SECRET=${WOODPECKER_SECRET}
[...]
```
## Configuration
This is a full list of configuration options. Please note that many of these options use default configuration values that should work for the majority of installations.
`WOODPECKER_GITLAB=true`
: Set to true to enable the GitLab driver.
`WOODPECKER_GITLAB_URL=https://gitlab.com`
: GitLab Server address.
`WOODPECKER_GITLAB_CLIENT`
: GitLab oauth2 client id.
`WOODPECKER_GITLAB_SECRET`
: GitLab oauth2 client secret.
`WOODPECKER_GITLAB_GIT_USERNAME`
: Optional. Use a single machine account username to clone all repositories.
`WOODPECKER_GITLAB_GIT_PASSWORD`
: Optional. Use a single machine account password to clone all repositories.
`WOODPECKER_GITLAB_SKIP_VERIFY=false`
: Set to true to disable SSL verification.
`WOODPECKER_GITLAB_PRIVATE_MODE=false`
: Set to true if GitLab is running in private mode.
## Registration
You must register your application with GitLab in order to generate a Client and Secret. Navigate to your account settings and choose Applications from the menu, and click New Application.
Please use `http://woodpecker.mycompany.com/authorize` as the Authorization callback URL. Grant `api` scope to the application.
## Configuration
This is a full list of configuration options. Please note that many of these options use default configuration values that should work for the majority of installations.
```shell
WOODPECKER_GITLAB=true # Set to true to enable the GitLab driver
WOODPECKER_GITLAB_URL=https://gitlab.com # GitLab Server address
WOODPECKER_GITLAB_CLIENT=... # GitLab oauth2 client id
WOODPECKER_GITLAB_SECRET=... # GitLab oauth2 client secret.
WOODPECKER_GITLAB_GIT_USERNAME=... # Optional. Use a single machine account username to clone all repositories
WOODPECKER_GITLAB_GIT_PASSWORD=... # Optional. Use a single machine account password to clone all repositories
WOODPECKER_GITLAB_SKIP_VERIFY=false # Set to true to disable SSL verification
WOODPECKER_GITLAB_PRIVATE_MODE=false # Set to true if GitLab is running in private mode
```

View file

@ -3,50 +3,22 @@
Woodpecker comes with built-in support for Bitbucket Cloud. To enable Bitbucket Cloud you should configure the Woodpecker container using the following environment variables:
```diff
# docker-compose.yml
version: '3'
services:
woodpecker-server:
image: woodpeckerci/woodpecker-server:latest
ports:
- 80:8000
- 9000
volumes:
- /var/lib/drone:/var/lib/drone/
restart: always
[...]
environment:
- WOODPECKER_OPEN=true
- WOODPECKER_HOST=${WOODPECKER_HOST}
- [...]
+ - WOODPECKER_BITBUCKET=true
+ - WOODPECKER_BITBUCKET_CLIENT=95c0282573633eb25e82
+ - WOODPECKER_BITBUCKET_SECRET=30f5064039e6b359e075
- WOODPECKER_SECRET=${WOODPECKER_SECRET}
woodpecker-agent:
image: woodpeckerci/woodpecker-agent:latest
restart: always
depends_on:
- woodpecker-server
volumes:
- /var/run/docker.sock:/var/run/docker.sock
environment:
- WOODPECKER_SERVER=woodpecker-server:9000
- WOODPECKER_SECRET=${WOODPECKER_SECRET}
[...]
```
## Configuration
This is a full list of configuration options. Please note that many of these options use default configuration values that should work for the majority of installations.
`WOODPECKER_BITBUCKET=true`
: Set to true to enable the Bitbucket driver.
`WOODPECKER_BITBUCKET_CLIENT`
: Bitbucket oauth2 client id
`WOODPECKER_BITBUCKET_SECRET`
: Bitbucket oauth2 client secret
## Registration
You must register your application with Bitbucket in order to generate a client and secret. Navigate to your account settings and choose OAuth from the menu, and click Add Consumer.
@ -67,6 +39,18 @@ Repositories:Read
Webhooks:Read and Write
```
## Configuration
This is a full list of configuration options. Please note that many of these options use default configuration values that should work for the majority of installations.
```shell
WOODPECKER_BITBUCKET=true # Set to true to enable the Bitbucket driver
WOODPECKER_BITBUCKET_CLIENT=... # Bitbucket oauth2 client id
WOODPECKER_BITBUCKET_SECRET=... # Bitbucket oauth2 client secret
```
## Missing Features
Merge requests are not currently supported. We are interested in patches to include this functionality. If you are interested in contributing to Woodpecker and submitting a patch please [contact us](https://discord.gg/fcMQqSMXJy).

View file

@ -3,40 +3,25 @@
Woodpecker comes with experimental support for Bitbucket Server, formerly known as Atlassian Stash. To enable Bitbucket Server you should configure the Woodpecker container using the following environment variables:
```diff
# docker-compose.yml
version: '3'
services:
woodpecker-server:
image: woodpeckerci/woodpecker-server:latest
ports:
- 80:8000
- 9000
volumes:
- /var/lib/drone:/var/lib/drone/
restart: always
[...]
environment:
- WOODPECKER_OPEN=true
- WOODPECKER_HOST=${WOODPECKER_HOST}
- [...]
+ - WOODPECKER_STASH=true
+ - WOODPECKER_STASH_GIT_USERNAME=foo
+ - WOODPECKER_STASH_GIT_PASSWORD=bar
+ - WOODPECKER_STASH_CONSUMER_KEY=95c0282573633eb25e82
+ - WOODPECKER_STASH_CONSUMER_RSA=/etc/bitbucket/key.pem
+ - WOODPECKER_STASH_URL=http://stash.mycompany.com
- WOODPECKER_SECRET=${WOODPECKER_SECRET}
volumes:
+ - /path/to/key.pem:/path/to/key.pem
woodpecker-agent:
image: woodpeckerci/woodpecker-agent:latest
restart: always
depends_on:
- woodpecker-server
volumes:
- /var/run/docker.sock:/var/run/docker.sock
environment:
- WOODPECKER_SERVER=woodpecker-server:9000
- WOODPECKER_SECRET=${WOODPECKER_SECRET}
[...]
```
## Private Key File
@ -58,43 +43,47 @@ Please note that the private key file can be mounted into your Woodpecker conati
Private key file mounted into your Woodpecker container at runtime as a volume.
```diff
version: '2'
# docker-compose.yml
version: '3'
services:
woodpecker-server:
image: woodpeckerci/woodpecker-server:latest
[...]
environment:
- WOODPECKER_OPEN=true
- WOODPECKER_HOST=${WOODPECKER_HOST}
- [...]
- WOODPECKER_STASH=true
- WOODPECKER_STASH_GIT_USERNAME=foo
- WOODPECKER_STASH_GIT_PASSWORD=bar
- WOODPECKER_STASH_CONSUMER_KEY=95c0282573633eb25e82
+ - WOODPECKER_STASH_CONSUMER_RSA=/etc/bitbucket/key.pem
- WOODPECKER_STASH_URL=http://stash.mycompany.com
- WOODPECKER_SECRET=${WOODPECKER_SECRET}
+ volumes:
+ - /etc/bitbucket/key.pem:/etc/bitbucket/key.pem
woodpecker-agent:
[...]
```
Private key as environment variable
```diff
# docker-compose.yml
version: '3'
services:
woodpecker-server:
image: woodpeckerci/woodpecker-server:latest
[...]
environment:
- WOODPECKER_OPEN=true
- WOODPECKER_HOST=${WOODPECKER_HOST}
- [...]
- WOODPECKER_STASH=true
- WOODPECKER_STASH_GIT_USERNAME=foo
- WOODPECKER_STASH_GIT_PASSWORD=bar
- WOODPECKER_STASH_CONSUMER_KEY=95c0282573633eb25e82
+ - WOODPECKER_STASH_CONSUMER_RSA_STRING=contentOfPemKeyAsString
- WOODPECKER_STASH_URL=http://stash.mycompany.com
- WOODPECKER_SECRET=${WOODPECKER_SECRET}
woodpecker-agent:
[...]
```
## Service Account
@ -112,24 +101,18 @@ Please use http://woodpecker.mycompany.com/authorize as the Authorization callba
This is a full list of configuration options. Please note that many of these options use default configuration values that should work for the majority of installations.
```shell
WOODPECKER_STASH=true # Set to true to enable the Bitbucket Server (Stash) driver
`WOODPECKER_STASH=true`
: Set to true to enable the Bitbucket Server (Stash) driver.
WOODPECKER_STASH_URL # Bitbucket Server address.
`WOODPECKER_STASH_URL`
: Bitbucket Server address.
WOODPECKER_STASH_CONSUMER_KEY=... # Bitbucket Server oauth1 consumer key
`WOODPECKER_STASH_CONSUMER_KEY`
: Bitbucket Server oauth1 consumer key
WOODPECKER_STASH_CONSUMER_RSA=... # Bitbucket Server oauth1 private key file
`WOODPECKER_STASH_CONSUMER_RSA`
: Bitbucket Server oauth1 private key file
WOODPECKER_STASH_CONSUMER_RSA_STRING=... # Bibucket Server oauth1 private key as a string
`WOODPECKER_STASH_CONSUMER_RSA_STRING`
: Bibucket Server oauth1 private key as a string
WOODPECKER_STASH_GIT_USERNAME=... # Machine account username used to clone repositories
`WOODPECKER_STASH_GIT_USERNAME`
: Machine account username used to clone repositories.
`WOODPECKER_STASH_GIT_PASSWORD`
: Machine account password used to clone repositories.
WOODPECKER_STASH_GIT_PASSWORD=... # Machine account password used to clone repositories
```

View file

@ -7,15 +7,14 @@ The default database engine of Woodpecker is an embedded SQLite database which r
By default Woodpecker uses a sqlite database stored under `/var/lib/drone/`. You can mount a [data volume](https://docs.docker.com/storage/volumes/#create-and-manage-volumes) to persist the sqlite database.
```diff
# docker-compose.yml
version: '3'
services:
woodpecker-server:
image: woodpeckerci/woodpecker-server:latest
ports:
- 80:8000
- 9000
[...]
+ volumes:
+ - woodpecker-server-data:/var/lib/drone/
restart: always
```
## Configure MySQL
@ -23,11 +22,12 @@ services:
The below example demonstrates mysql database configuration. See the official driver [documentation](https://github.com/go-sql-driver/mysql#dsn-data-source-name) for configuration options and examples.
```diff
# docker-compose.yml
version: '3'
services:
woodpecker-server:
image: woodpeckerci/woodpecker-server:latest
[...]
environment:
+ WOODPECKER_DATABASE_DRIVER: mysql
+ WOODPECKER_DATABASE_DATASOURCE: root:password@tcp(1.2.3.4:3306)/woodpecker?parseTime=true
@ -38,11 +38,12 @@ services:
The below example demonstrates postgres database configuration. See the official driver [documentation](https://www.postgresql.org/docs/current/static/libpq-connect.html#LIBPQ-CONNSTRING) for configuration options and examples.
```diff
# docker-compose.yml
version: '3'
services:
woodpecker-server:
image: woodpeckerci/woodpecker-server:latest
[...]
environment:
+ WOODPECKER_DATABASE_DRIVER: postgres
+ WOODPECKER_DATABASE_DATASOURCE: postgres://root:password@1.2.3.4:5432/postgres?sslmode=disable

View file

@ -11,23 +11,18 @@ Woodpecker supports automated SSL configuration and updates using Let's Encrypt.
You can enable Let's Encrypt by making the following modifications to your server configuration:
```diff
# docker-compose.yml
version: '3'
services:
woodpecker-server:
image: woodpeckerci/woodpecker-server:latest
[...]
ports:
+ - 80:80
+ - 443:443
- 9000:9000
volumes:
- /var/lib/drone:/var/lib/drone/
restart: always
environment:
- WOODPECKER_OPEN=true
- WOODPECKER_HOST=${WOODPECKER_HOST}
- WOODPECKER_GITHUB=true
- WOODPECKER_GITHUB_CLIENT=${WOODPECKER_GITHUB_CLIENT}
- WOODPECKER_GITHUB_SECRET=${WOODPECKER_GITHUB_SECRET}
- WOODPECKER_SECRET=${WOODPECKER_SECRET}
- [...]
+ - WOODPECKER_LETS_ENCRYPT=true
```
@ -52,19 +47,21 @@ Woodpecker uses the official Go acme library which will handle certificate upgra
Woodpecker supports ssl configuration by mounting certificates into your container.
```diff
# docker-compose.yml
version: '3'
services:
woodpecker-server:
image: woodpeckerci/woodpecker-server:latest
[...]
ports:
+ - 80:80
+ - 443:443
- 9000:9000
volumes:
- /var/lib/drone:/var/lib/drone/
+ - /etc/certs/woodpecker.foo.com/server.crt:/etc/certs/woodpecker.foo.com/server.crt
+ - /etc/certs/woodpecker.foo.com/server.key:/etc/certs/woodpecker.foo.com/server.key
restart: always
environment:
- [...]
+ - WOODPECKER_SERVER_CERT=/etc/certs/woodpecker.foo.com/server.crt
+ - WOODPECKER_SERVER_KEY=/etc/certs/woodpecker.foo.com/server.key
```
@ -72,9 +69,12 @@ services:
Update your configuration to expose the following ports:
```diff
# docker-compose.yml
version: '3'
services:
woodpecker-server:
image: woodpeckerci/woodpecker-server:latest
[...]
ports:
+ - 80:80
+ - 443:443
@ -84,15 +84,17 @@ services:
Update your configuration to mount your certificate and key:
```diff
# docker-compose.yml
version: '3'
services:
woodpecker-server:
image: woodpeckerci/woodpecker-server:latest
[...]
ports:
- 80:80
- 443:443
- 9000:9000
volumes:
- /var/lib/drone:/var/lib/drone/
+ - /etc/certs/woodpecker.foo.com/server.crt:/etc/certs/woodpecker.foo.com/server.crt
+ - /etc/certs/woodpecker.foo.com/server.key:/etc/certs/woodpecker.foo.com/server.key
```
@ -100,18 +102,19 @@ services:
Update your configuration to provide the paths of your certificate and key:
```diff
# docker-compose.yml
version: '3'
services:
woodpecker-server:
image: woodpeckerci/woodpecker-server:latest
[...]
ports:
- 80:80
- 443:443
- 9000:9000
volumes:
- /var/lib/drone:/var/lib/drone/
- /etc/certs/woodpecker.foo.com/server.crt:/etc/certs/woodpecker.foo.com/server.crt
- /etc/certs/woodpecker.foo.com/server.key:/etc/certs/woodpecker.foo.com/server.key
restart: always
environment:
+ - WOODPECKER_SERVER_CERT=/etc/certs/woodpecker.foo.com/server.crt
+ - WOODPECKER_SERVER_KEY=/etc/certs/woodpecker.foo.com/server.key