0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-21 14:12:36 -05:00

🔧 Functions to drop uxbox

Signed-off-by: mathieu.brunot <mathieu.brunot@monogramm.io>
This commit is contained in:
mathieu.brunot 2019-12-27 05:30:35 +01:00 committed by Andrey Antukh
parent 014b23647a
commit 4a4b0a0c3b

View file

@ -32,6 +32,11 @@ function stop-devenv {
docker-compose -p uxboxdev -f docker/devenv/docker-compose.yaml stop -t 2; docker-compose -p uxboxdev -f docker/devenv/docker-compose.yaml stop -t 2;
} }
function drop-devenv {
docker-compose -p uxboxdev -f docker/devenv/docker-compose.yaml down -t 2 -v;
remove-devenv-images;
}
function run-devenv { function run-devenv {
if [[ ! $(docker ps -f "name=uxboxdev-main" -q) ]]; then if [[ ! $(docker ps -f "name=uxboxdev-main" -q) ]]; then
start-devenv start-devenv
@ -206,6 +211,10 @@ function stop {
docker-compose -p uxbox -f ./docker/docker-compose.yml stop docker-compose -p uxbox -f ./docker/docker-compose.yml stop
} }
function drop {
docker-compose -p uxbox -f docker/docker-compose.yml down -t 2 -v;
}
function usage { function usage {
echo "UXBOX build & release manager v$REV" echo "UXBOX build & release manager v$REV"
echo "USAGE: $0 OPTION" echo "USAGE: $0 OPTION"
@ -215,6 +224,7 @@ function usage {
echo "- build-devenv Build docker development oriented image; (can specify external user id in parameter)" echo "- build-devenv Build docker development oriented image; (can specify external user id in parameter)"
echo "- start-devenv Start the development oriented docker-compose service." echo "- start-devenv Start the development oriented docker-compose service."
echo "- stop-devenv Stops the development oriented docker-compose service." echo "- stop-devenv Stops the development oriented docker-compose service."
echo "- drop-devenv Remove the development oriented docker-compose containers, volumes and clean images."
echo "- run-devenv Attaches to the running devenv container and starts development environment" echo "- run-devenv Attaches to the running devenv container and starts development environment"
echo " based on tmux (frontend at localhost:3449, backend at localhost:6060)." echo " based on tmux (frontend at localhost:3449, backend at localhost:6060)."
echo "" echo ""
@ -229,6 +239,7 @@ function usage {
echo "- log Attach to docker logs." echo "- log Attach to docker logs."
echo "- run Run 'production ready' docker compose" echo "- run Run 'production ready' docker compose"
echo "- stop Stop 'production ready' docker compose" echo "- stop Stop 'production ready' docker compose"
echo "- drop Remove the production oriented docker-compose containers and volumes."
} }
case $1 in case $1 in
@ -250,6 +261,9 @@ case $1 in
stop-devenv) stop-devenv)
stop-devenv ${@:2} stop-devenv ${@:2}
;; ;;
drop-devenv)
drop-devenv ${@:2}
;;
log-devenv) log-devenv)
log-devenv ${@:2} log-devenv ${@:2}
;; ;;
@ -293,6 +307,10 @@ case $1 in
stop stop
;; ;;
drop)
drop
;;
*) *)
usage usage
;; ;;