gentoo-overlay/dev-util/drone/files/drone.sh

28 lines
511 B
Bash
Raw Normal View History

#!/bin/sh
# $DRONE_CONFIG_FILE contains path to the config file
if [[ -z "${DRONE_CONFIG_FILE}" ]] ; then
echo "DRONE_CONFIG_FILE not set!"
exit 1
fi
. "${DRONE_CONFIG_FILE}"
docker_args=""
for var in "${!DRONE_@}" ; do
docker_args="${docker_args} --env=${var}=${!var} "
done
for p in ${DOCKER_PUBLISH} ; do
docker_args="${docker_args} --publish=${p}"
done
docker run \
--volume=/var/lib/drone:/data \
${docker_args}
--restart=always \
--detach=true \
--name=drone \
drone/drone:<VERSION>