#!/usr/bin/env bash set -euo pipefail IFS=$'\n\t' #export RC_VERSION="4.28.0.REL20221120_SOURCE" #docker image tag 94977371485a rhodecode/rhodecode-ee:4.27.0.DEV_BUILD usage="$(basename "$0") ./dev.sh -- run docker command where : v|vcs -- run bash console for vcsserver e|ee -- run bash console for rhodecode-ee c|ce -- run bash console for rhodecode-ce dev-env -- create dev env required to run vcsserver and rhodecode prune -- clear disk space for docker " case ${1:-} in v|vcs ) eval "(docker stop dev-vcsserver || echo skip-stop ) && ./rccontrol stack rhodecode -f docker-compose-apps.dev.yaml run --service-ports --rm --use-aliases --workdir="/home/rhodecode/rhodecode-vcsserver" --name="dev-vcsserver" vcsserver bash" exit ;; e|ee ) eval "(docker stop dev-enterprise-ee || echo skip-stop ) && ./rccontrol stack rhodecode -f docker-compose-apps.dev.yaml run -e RC_APP_TYPE=rhodecode_bash --publish 10020:10020 --rm --use-aliases --workdir="/home/rhodecode/rhodecode-enterprise-ee" --name="dev-enterprise-ee" rhodecode bash" exit ;; c|ce ) eval "(docker stop dev-enterprise-ce || echo skip-stop ) && ./rccontrol stack rhodecode -f docker-compose-apps.dev.yaml run --publish 10022:10020 --rm --use-aliases --workdir="/home/rhodecode/rhodecode-enterprise-ce" --name="dev-enterprise-ce" rhodecode bash" exit ;; dev-env ) eval "./rccontrol stack metrics up --detach statsd-exporter && ./rccontrol stack services up --detach && ./rccontrol stack rhodecode up --detach celery celery-beat && ./rccontrol status" exit ;; prune ) docker system prune -f docker builder prune -a -f docker image prune -a -f docker system df exit ;; * ) echo "${usage}" exit ;; esac