dev.sh
47 lines
| 1.9 KiB
| application/x-sh
|
BashLexer
r26 | #!/usr/bin/env bash | |||
set -euo pipefail | ||||
IFS=$'\n\t' | ||||
#export RC_VERSION="4.28.0.REL20221120_SOURCE" | ||||
r39 | #docker image tag 94977371485a rhodecode/rhodecode-ee:4.27.0.DEV_BUILD | |||
r26 | ||||
usage="$(basename "$0") ./dev.sh <COMMAND> -- run docker command | ||||
where <COMMAND>: | ||||
r39 | v|vcs -- run bash console for vcsserver | |||
e|ee -- run bash console for rhodecode-ee | ||||
c|ce -- run bash console for rhodecode-ce | ||||
r26 | dev-env -- create dev env required to run vcsserver and rhodecode | |||
r58 | prune -- clear disk space for docker | |||
r26 | " | |||
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 | ||||
;; | ||||
r39 | e|ee ) | |||
r26 | 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 | ||||
;; | ||||
r39 | c|ce ) | |||
r26 | 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 ) | ||||
r80 | eval "./rccontrol stack metrics up --detach statsd-exporter && ./rccontrol stack services up --detach && ./rccontrol stack rhodecode up --detach celery celery-beat && ./rccontrol status" | |||
r26 | exit | |||
;; | ||||
r58 | prune ) | |||
docker system prune -f | ||||
docker builder prune -a -f | ||||
docker image prune -a -f | ||||
docker system df | ||||
exit | ||||
;; | ||||
r26 | * ) | |||
echo "${usage}" | ||||
exit | ||||
;; | ||||
esac | ||||