diff --git a/pages/02.linux/28.woodpecker-ci/default.en.md b/pages/02.linux/28.woodpecker-ci/default.en.md index 81c5d6b..d0457a7 100644 --- a/pages/02.linux/28.woodpecker-ci/default.en.md +++ b/pages/02.linux/28.woodpecker-ci/default.en.md @@ -3,3 +3,41 @@ title: 'Woodpecker CI' --- [toc] +## Podman +### Pod +`# podman pod create --name woodpecker -p 8000:8000` +### Server +``` +# podman run --name woodpecker-server -t \ + -e WOODPECKER_OPEN=true \ + -e WOODPECKER_HOST=${WOODPECKER_HOST} \ + -e WOODPECKER_GITEA=true + -e WOODPECKER_GITEA_URL=${WOODPECKER_GITEA_URL} + -e WOODPECKER_GITEA_CLIENT=${WOODPECKER_GITEA_CLIENT} + -e WOODPECKER_GITEA_SECRET=${WOODPECKER_GITEA_SECRET} + -e WOODPECKER_AGENT_SECRET=${WOODPECKER_AGENT_SECRET} \ + -e WOODPECKER_DATABASE_DRIVER=postgres \ + -e WOODPECKER_DATABASE_DATASOURCE=postgres://root:password@1.2.3.4:5432/postgres?sslmode=disable \ + -v /mnt/woodpecker:/var/lib/woodpecker/ \ + --pod=woodpecker \ + -d docker.io/woodpeckerci/woodpecker-server:latest +``` +### Agent + +``` +# podman run --name woodpecker-agent -t \ + -e WOODPECKER_SERVER=woodpecker-server:9000 \ + -e WOODPECKER_AGENT_SECRET=${WOODPECKER_AGENT_SECRET} \ +``` + + 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_AGENT_SECRET=${WOODPECKER_AGENT_SECRET} \ No newline at end of file