mirror of
https://github.com/fbartels/cloudron-drone-app.git
synced 2024-11-15 18:01:00 +00:00
add scripting to run agent
Signed-off-by: Felix Bartels <felix@host-consultants.de>
This commit is contained in:
parent
ab399ce040
commit
e80b4f3118
4 changed files with 39 additions and 0 deletions
6
.dockerignore
Normal file
6
.dockerignore
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
.dockerignore
|
||||||
|
.git
|
||||||
|
.gitignore
|
||||||
|
docker-compose.yml
|
||||||
|
node_modules
|
||||||
|
run-agent.sh
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
||||||
|
.env
|
15
docker-compose.yml
Normal file
15
docker-compose.yml
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
version: '3'
|
||||||
|
|
||||||
|
services:
|
||||||
|
drone-agent:
|
||||||
|
container_name: drone-agent
|
||||||
|
image: drone/agent:1
|
||||||
|
command: agent
|
||||||
|
restart: always
|
||||||
|
volumes:
|
||||||
|
- /var/run/docker.sock:/var/run/docker.sock
|
||||||
|
environment:
|
||||||
|
- DRONE_RPC_SERVER=https://drone.9wd.eu
|
||||||
|
- DRONE_RPC_SECRET=QdExkSpgVY5RiC783UcqFgt8mvEs0Mid
|
||||||
|
- DRONE_RUNNER_CAPACITY=2
|
||||||
|
- DRONE_RUNNER_NAME="clifford"
|
17
run-agent.sh
Executable file
17
run-agent.sh
Executable file
|
@ -0,0 +1,17 @@
|
||||||
|
#/bin/sh
|
||||||
|
|
||||||
|
set -x
|
||||||
|
|
||||||
|
random_string() {
|
||||||
|
LC_CTYPE=C tr -dc 'a-zA-Z0-9' < /dev/urandom | head -c32
|
||||||
|
}
|
||||||
|
|
||||||
|
if [ ! -e .env ]; then
|
||||||
|
cat <<-EOF > ".env"
|
||||||
|
DRONE_RPC_SERVER=https://drone.9wd.eu
|
||||||
|
DRONE_RPC_SECRET=QdExkSpgVY5RiC783UcqFgt8mvEs0Mid
|
||||||
|
DRONE_RUNNER_CAPACITY="$(nproc)"
|
||||||
|
DRONE_RUNNER_NAME="$(hostname)"
|
||||||
|
EOF
|
||||||
|
fi
|
||||||
|
docker-compose up -d
|
Loading…
Reference in a new issue