HEX
HEX
Server: Apache/2.4.29 (Ubuntu)
System: Linux 2amigos-php74 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64
User: squarehillcompany.com (1002)
PHP: 7.4.25
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: /var/www/vhosts/textpony-dev.2amigos.us/docroot/development
#!/bin/bash

# Load environment variables
FILE=.env
if test -f "$FILE"; then
    export $(egrep -v '^#' "$FILE" | xargs)
fi


while getopts svfh options; do
    case $options in
    ?)
        printf "Execute common tasks using shortcuts.\n"
        printf "\nUsage:\n  %s: [options] [command]\n" "$0"
        printf "\nCommands:\n"
        printf "  up        Create the development environment.\n"
        printf "  down      Stop and destroy the development environment.\n"
        printf "  build     Build the docker images.\n"
        printf "  logs      Display the stack logs.\n"
        printf "  status    Display the container status.\n"
        printf "  start     Start a stopped development environment.\n"
        printf "  stop      Stop a development environment.\n"
        printf "  nx-graph  Serve nx graph.\n"
        printf "  dev-panel Start panel application development server.\n"
        printf "\nOptions:\n"
        printf "  -h        Display help information.\n"
        printf "\n"
        exit 2
        ;;
    esac
done
shift $((OPTIND - 1))

if [[ -z "${*:1}" ]]; then
    exit 1
fi

case "${*:1}" in
"up") docker-compose -f ./infrastructure/textpony-dev/stack.yml up -d ;;
"down") docker-compose -f ./infrastructure/textpony-dev/stack.yml down --remove-orphans ;;
"build") docker-compose -f ./infrastructure/textpony-dev/stack.yml build ;;
"logs") docker-compose -f ./infrastructure/textpony-dev/stack.yml logs ;;
"status") docker-compose -f ./infrastructure/textpony-dev/stack.yml ps -a ;;
"start") docker-compose -f ./infrastructure/textpony-dev/stack.yml start ;;
"stop") docker-compose -f ./infrastructure/textpony-dev/stack.yml stop ;;
"nx-graph") docker-compose -f ./infrastructure/textpony-dev/stack.yml exec workspace nx graph --host=0.0.0.0 ;;
"dev-panel") docker-compose -f ./infrastructure/textpony-dev/stack.yml exec workspace nx run panel:serve --host=0.0.0.0 ;;
"dev-web") docker-compose -f ./infrastructure/textpony-dev/stack.yml exec workspace nx run web:serve --host=0.0.0.0 --port=3333 ;;
*) docker-compose -f ./infrastructure/textpony-dev/stack.yml exec workspace "${@:1}" ;;
esac