One Hat Cyber Team
Your IP:
216.73.216.30
Server IP:
198.54.114.155
Server:
Linux server71.web-hosting.com 4.18.0-513.18.1.lve.el8.x86_64 #1 SMP Thu Feb 22 12:55:50 UTC 2024 x86_64
Server Software:
LiteSpeed
PHP Version:
5.6.40
Create File
|
Create Folder
Execute
Dir :
~
/
proc
/
self
/
root
/
proc
/
thread-self
/
cwd
/
Edit File:
sail.tar
runtimes/8.2/php.ini 0000644 00000000156 15111177516 0010220 0 ustar 00 [PHP] post_max_size = 100M upload_max_filesize = 100M variables_order = EGPCS [opcache] opcache.enable_cli=1 runtimes/8.2/supervisord.conf 0000644 00000000566 15111177516 0012171 0 ustar 00 [supervisord] nodaemon=true user=root logfile=/var/log/supervisor/supervisord.log pidfile=/var/run/supervisord.pid [program:php] command=/usr/bin/php -d variables_order=EGPCS /var/www/html/artisan serve --host=0.0.0.0 --port=80 user=sail environment=LARAVEL_SAIL="1" stdout_logfile=/dev/stdout stdout_logfile_maxbytes=0 stderr_logfile=/dev/stderr stderr_logfile_maxbytes=0 runtimes/8.2/start-container 0000644 00000000450 15111177516 0011765 0 ustar 00 #!/usr/bin/env bash if [ ! -z "$WWWUSER" ]; then usermod -u $WWWUSER sail fi if [ ! -d /.composer ]; then mkdir /.composer fi chmod -R ugo+rw /.composer if [ $# -gt 0 ]; then exec gosu $WWWUSER "$@" else exec /usr/bin/supervisord -c /etc/supervisor/conf.d/supervisord.conf fi runtimes/8.2/Dockerfile 0000644 00000005751 15111177516 0010730 0 ustar 00 FROM ubuntu:22.04 LABEL maintainer="Taylor Otwell" ARG WWWGROUP ARG NODE_VERSION=20 ARG POSTGRES_VERSION=15 WORKDIR /var/www/html ENV DEBIAN_FRONTEND noninteractive ENV TZ=UTC RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone RUN apt-get update \ && mkdir -p /etc/apt/keyrings \ && apt-get install -y gnupg gosu curl ca-certificates zip unzip git supervisor sqlite3 libcap2-bin libpng-dev python2 dnsutils librsvg2-bin fswatch \ && curl -sS 'https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x14aa40ec0831756756d7f66c4f4ea0aae5267a6c' | gpg --dearmor | tee /etc/apt/keyrings/ppa_ondrej_php.gpg > /dev/null \ && echo "deb [signed-by=/etc/apt/keyrings/ppa_ondrej_php.gpg] https://ppa.launchpadcontent.net/ondrej/php/ubuntu jammy main" > /etc/apt/sources.list.d/ppa_ondrej_php.list \ && apt-get update \ && apt-get install -y php8.2-cli php8.2-dev \ php8.2-pgsql php8.2-sqlite3 php8.2-gd php8.2-imagick \ php8.2-curl \ php8.2-imap php8.2-mysql php8.2-mbstring \ php8.2-xml php8.2-zip php8.2-bcmath php8.2-soap \ php8.2-intl php8.2-readline \ php8.2-ldap \ php8.2-msgpack php8.2-igbinary php8.2-redis php8.2-swoole \ php8.2-memcached php8.2-pcov php8.2-xdebug \ && curl -sLS https://getcomposer.org/installer | php -- --install-dir=/usr/bin/ --filename=composer \ && curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg \ && echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_VERSION.x nodistro main" > /etc/apt/sources.list.d/nodesource.list \ && apt-get update \ && apt-get install -y nodejs \ && npm install -g npm \ && npm install -g pnpm \ && npm install -g bun \ && curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | gpg --dearmor | tee /etc/apt/keyrings/yarn.gpg >/dev/null \ && echo "deb [signed-by=/etc/apt/keyrings/yarn.gpg] https://dl.yarnpkg.com/debian/ stable main" > /etc/apt/sources.list.d/yarn.list \ && curl -sS https://www.postgresql.org/media/keys/ACCC4CF8.asc | gpg --dearmor | tee /etc/apt/keyrings/pgdg.gpg >/dev/null \ && echo "deb [signed-by=/etc/apt/keyrings/pgdg.gpg] http://apt.postgresql.org/pub/repos/apt jammy-pgdg main" > /etc/apt/sources.list.d/pgdg.list \ && apt-get update \ && apt-get install -y yarn \ && apt-get install -y mysql-client \ && apt-get install -y postgresql-client-$POSTGRES_VERSION \ && apt-get -y autoremove \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* RUN setcap "cap_net_bind_service=+ep" /usr/bin/php8.2 RUN groupadd --force -g $WWWGROUP sail RUN useradd -ms /bin/bash --no-user-group -g $WWWGROUP -u 1337 sail COPY start-container /usr/local/bin/start-container COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf COPY php.ini /etc/php/8.2/cli/conf.d/99-sail.ini RUN chmod +x /usr/local/bin/start-container EXPOSE 8000 ENTRYPOINT ["start-container"] runtimes/8.1/php.ini 0000644 00000000156 15111177516 0010217 0 ustar 00 [PHP] post_max_size = 100M upload_max_filesize = 100M variables_order = EGPCS [opcache] opcache.enable_cli=1 runtimes/8.1/supervisord.conf 0000644 00000000566 15111177516 0012170 0 ustar 00 [supervisord] nodaemon=true user=root logfile=/var/log/supervisor/supervisord.log pidfile=/var/run/supervisord.pid [program:php] command=/usr/bin/php -d variables_order=EGPCS /var/www/html/artisan serve --host=0.0.0.0 --port=80 user=sail environment=LARAVEL_SAIL="1" stdout_logfile=/dev/stdout stdout_logfile_maxbytes=0 stderr_logfile=/dev/stderr stderr_logfile_maxbytes=0 runtimes/8.1/start-container 0000644 00000000450 15111177516 0011764 0 ustar 00 #!/usr/bin/env bash if [ ! -z "$WWWUSER" ]; then usermod -u $WWWUSER sail fi if [ ! -d /.composer ]; then mkdir /.composer fi chmod -R ugo+rw /.composer if [ $# -gt 0 ]; then exec gosu $WWWUSER "$@" else exec /usr/bin/supervisord -c /etc/supervisor/conf.d/supervisord.conf fi runtimes/8.1/Dockerfile 0000644 00000005730 15111177516 0010724 0 ustar 00 FROM ubuntu:22.04 LABEL maintainer="Taylor Otwell" ARG WWWGROUP ARG NODE_VERSION=20 ARG POSTGRES_VERSION=15 WORKDIR /var/www/html ENV DEBIAN_FRONTEND noninteractive ENV TZ=UTC RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone RUN apt-get update \ && mkdir -p /etc/apt/keyrings \ && apt-get install -y gnupg gosu curl ca-certificates zip unzip git supervisor sqlite3 libcap2-bin libpng-dev python2 dnsutils librsvg2-bin fswatch \ && curl -sS 'https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x14aa40ec0831756756d7f66c4f4ea0aae5267a6c' | gpg --dearmor | tee /usr/share/keyrings/ppa_ondrej_php.gpg > /dev/null \ && echo "deb [signed-by=/usr/share/keyrings/ppa_ondrej_php.gpg] https://ppa.launchpadcontent.net/ondrej/php/ubuntu jammy main" > /etc/apt/sources.list.d/ppa_ondrej_php.list \ && apt-get update \ && apt-get install -y php8.1-cli php8.1-dev \ php8.1-pgsql php8.1-sqlite3 php8.1-gd php8.1-imagick \ php8.1-curl \ php8.1-imap php8.1-mysql php8.1-mbstring \ php8.1-xml php8.1-zip php8.1-bcmath php8.1-soap \ php8.1-intl php8.1-readline \ php8.1-ldap \ php8.1-msgpack php8.1-igbinary php8.1-redis php8.1-swoole \ php8.1-memcached php8.1-pcov php8.1-xdebug \ && curl -sLS https://getcomposer.org/installer | php -- --install-dir=/usr/bin/ --filename=composer \ && curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg \ && echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_VERSION.x nodistro main" > /etc/apt/sources.list.d/nodesource.list \ && apt-get update \ && apt-get install -y nodejs \ && npm install -g npm \ && npm install -g bun \ && curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | gpg --dearmor | tee /usr/share/keyrings/yarn.gpg >/dev/null \ && echo "deb [signed-by=/usr/share/keyrings/yarn.gpg] https://dl.yarnpkg.com/debian/ stable main" > /etc/apt/sources.list.d/yarn.list \ && curl -sS https://www.postgresql.org/media/keys/ACCC4CF8.asc | gpg --dearmor | tee /usr/share/keyrings/pgdg.gpg >/dev/null \ && echo "deb [signed-by=/usr/share/keyrings/pgdg.gpg] http://apt.postgresql.org/pub/repos/apt jammy-pgdg main" > /etc/apt/sources.list.d/pgdg.list \ && apt-get update \ && apt-get install -y yarn \ && apt-get install -y mysql-client \ && apt-get install -y postgresql-client-$POSTGRES_VERSION \ && apt-get -y autoremove \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* RUN setcap "cap_net_bind_service=+ep" /usr/bin/php8.1 RUN groupadd --force -g $WWWGROUP sail RUN useradd -ms /bin/bash --no-user-group -g $WWWGROUP -u 1337 sail COPY start-container /usr/local/bin/start-container COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf COPY php.ini /etc/php/8.1/cli/conf.d/99-sail.ini RUN chmod +x /usr/local/bin/start-container EXPOSE 8000 ENTRYPOINT ["start-container"] runtimes/8.0/php.ini 0000644 00000000156 15111177517 0010217 0 ustar 00 [PHP] post_max_size = 100M upload_max_filesize = 100M variables_order = EGPCS [opcache] opcache.enable_cli=1 runtimes/8.0/supervisord.conf 0000644 00000000566 15111177517 0012170 0 ustar 00 [supervisord] nodaemon=true user=root logfile=/var/log/supervisor/supervisord.log pidfile=/var/run/supervisord.pid [program:php] command=/usr/bin/php -d variables_order=EGPCS /var/www/html/artisan serve --host=0.0.0.0 --port=80 user=sail environment=LARAVEL_SAIL="1" stdout_logfile=/dev/stdout stdout_logfile_maxbytes=0 stderr_logfile=/dev/stderr stderr_logfile_maxbytes=0 runtimes/8.0/start-container 0000644 00000000450 15111177517 0011764 0 ustar 00 #!/usr/bin/env bash if [ ! -z "$WWWUSER" ]; then usermod -u $WWWUSER sail fi if [ ! -d /.composer ]; then mkdir /.composer fi chmod -R ugo+rw /.composer if [ $# -gt 0 ]; then exec gosu $WWWUSER "$@" else exec /usr/bin/supervisord -c /etc/supervisor/conf.d/supervisord.conf fi runtimes/8.0/Dockerfile 0000644 00000006010 15111177517 0010714 0 ustar 00 FROM ubuntu:20.04 LABEL maintainer="Taylor Otwell" ARG WWWGROUP ARG NODE_VERSION=20 ARG POSTGRES_VERSION=13 WORKDIR /var/www/html ENV DEBIAN_FRONTEND noninteractive ENV TZ=UTC RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone RUN apt-get update \ && mkdir -p /etc/apt/keyrings \ && apt-get install -y gnupg gosu curl ca-certificates zip unzip git supervisor sqlite3 libcap2-bin libpng-dev python2 dnsutils librsvg2-bin fswatch \ && curl -sS 'https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x14aa40ec0831756756d7f66c4f4ea0aae5267a6c' | gpg --dearmor | tee /usr/share/keyrings/ppa_ondrej_php.gpg > /dev/null \ && echo "deb [signed-by=/usr/share/keyrings/ppa_ondrej_php.gpg] https://ppa.launchpadcontent.net/ondrej/php/ubuntu focal main" > /etc/apt/sources.list.d/ppa_ondrej_php.list \ && apt-get update \ && apt-get install -y php8.0-cli php8.0-dev \ php8.0-pgsql php8.0-sqlite3 php8.0-gd php8.0-imagick \ php8.0-curl php8.0-memcached \ php8.0-imap php8.0-mysql php8.0-mbstring \ php8.0-xml php8.0-zip php8.0-bcmath php8.0-soap \ php8.0-intl php8.0-readline php8.0-pcov \ php8.0-msgpack php8.0-igbinary php8.0-ldap \ php8.0-redis php8.0-swoole php8.0-xdebug \ && curl -sLS https://getcomposer.org/installer | php -- --install-dir=/usr/bin/ --filename=composer \ && curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg \ && echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_VERSION.x nodistro main" > /etc/apt/sources.list.d/nodesource.list \ && apt-get update \ && apt-get install -y nodejs \ && npm install -g npm \ && npm install -g bun \ && curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | gpg --dearmor | tee /usr/share/keyrings/yarnkey.gpg >/dev/null \ && echo "deb [signed-by=/usr/share/keyrings/yarnkey.gpg] https://dl.yarnpkg.com/debian/ stable main" > /etc/apt/sources.list.d/yarn.list \ && curl -sS https://www.postgresql.org/media/keys/ACCC4CF8.asc | gpg --dearmor | tee /usr/share/keyrings/pgdg.gpg >/dev/null \ && echo "deb [signed-by=/usr/share/keyrings/pgdg.gpg] http://apt.postgresql.org/pub/repos/apt focal-pgdg main" > /etc/apt/sources.list.d/pgdg.list \ && apt-get update \ && apt-get install -y yarn \ && apt-get install -y mysql-client \ && apt-get install -y postgresql-client-$POSTGRES_VERSION \ && apt-get -y autoremove \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* RUN update-alternatives --set php /usr/bin/php8.0 RUN setcap "cap_net_bind_service=+ep" /usr/bin/php8.0 RUN groupadd --force -g $WWWGROUP sail RUN useradd -ms /bin/bash --no-user-group -g $WWWGROUP -u 1337 sail COPY start-container /usr/local/bin/start-container COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf COPY php.ini /etc/php/8.0/cli/conf.d/99-sail.ini RUN chmod +x /usr/local/bin/start-container EXPOSE 8000 ENTRYPOINT ["start-container"] runtimes/8.3/php.ini 0000644 00000000156 15111177517 0010222 0 ustar 00 [PHP] post_max_size = 100M upload_max_filesize = 100M variables_order = EGPCS [opcache] opcache.enable_cli=1 runtimes/8.3/supervisord.conf 0000644 00000000566 15111177517 0012173 0 ustar 00 [supervisord] nodaemon=true user=root logfile=/var/log/supervisor/supervisord.log pidfile=/var/run/supervisord.pid [program:php] command=/usr/bin/php -d variables_order=EGPCS /var/www/html/artisan serve --host=0.0.0.0 --port=80 user=sail environment=LARAVEL_SAIL="1" stdout_logfile=/dev/stdout stdout_logfile_maxbytes=0 stderr_logfile=/dev/stderr stderr_logfile_maxbytes=0 runtimes/8.3/start-container 0000644 00000000450 15111177517 0011767 0 ustar 00 #!/usr/bin/env bash if [ ! -z "$WWWUSER" ]; then usermod -u $WWWUSER sail fi if [ ! -d /.composer ]; then mkdir /.composer fi chmod -R ugo+rw /.composer if [ $# -gt 0 ]; then exec gosu $WWWUSER "$@" else exec /usr/bin/supervisord -c /etc/supervisor/conf.d/supervisord.conf fi runtimes/8.3/Dockerfile 0000644 00000005770 15111177517 0010733 0 ustar 00 FROM ubuntu:22.04 LABEL maintainer="Taylor Otwell" ARG WWWGROUP ARG NODE_VERSION=20 ARG POSTGRES_VERSION=15 WORKDIR /var/www/html ENV DEBIAN_FRONTEND noninteractive ENV TZ=UTC RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone RUN apt-get update \ && mkdir -p /etc/apt/keyrings \ && apt-get install -y gnupg gosu curl ca-certificates zip unzip git supervisor sqlite3 libcap2-bin libpng-dev python2 dnsutils librsvg2-bin fswatch \ && curl -sS 'https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x14aa40ec0831756756d7f66c4f4ea0aae5267a6c' | gpg --dearmor | tee /etc/apt/keyrings/ppa_ondrej_php.gpg > /dev/null \ && echo "deb [signed-by=/etc/apt/keyrings/ppa_ondrej_php.gpg] https://ppa.launchpadcontent.net/ondrej/php/ubuntu jammy main" > /etc/apt/sources.list.d/ppa_ondrej_php.list \ && apt-get update \ && apt-get install -y php8.3-cli php8.3-dev \ php8.3-pgsql php8.3-sqlite3 php8.3-gd \ php8.3-curl \ php8.3-imap php8.3-mysql php8.3-mbstring \ php8.3-xml php8.3-zip php8.3-bcmath php8.3-soap \ php8.3-intl php8.3-readline \ php8.3-ldap \ # php8.3-msgpack php8.3-igbinary php8.3-redis php8.3-swoole \ # php8.3-memcached php8.3-pcov php8.3-xdebug \ # php8.3-imagick \ && curl -sLS https://getcomposer.org/installer | php -- --install-dir=/usr/bin/ --filename=composer \ && curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg \ && echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_VERSION.x nodistro main" > /etc/apt/sources.list.d/nodesource.list \ && apt-get update \ && apt-get install -y nodejs \ && npm install -g npm \ && npm install -g pnpm \ && npm install -g bun \ && curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | gpg --dearmor | tee /etc/apt/keyrings/yarn.gpg >/dev/null \ && echo "deb [signed-by=/etc/apt/keyrings/yarn.gpg] https://dl.yarnpkg.com/debian/ stable main" > /etc/apt/sources.list.d/yarn.list \ && curl -sS https://www.postgresql.org/media/keys/ACCC4CF8.asc | gpg --dearmor | tee /etc/apt/keyrings/pgdg.gpg >/dev/null \ && echo "deb [signed-by=/etc/apt/keyrings/pgdg.gpg] http://apt.postgresql.org/pub/repos/apt jammy-pgdg main" > /etc/apt/sources.list.d/pgdg.list \ && apt-get update \ && apt-get install -y yarn \ && apt-get install -y mysql-client \ && apt-get install -y postgresql-client-$POSTGRES_VERSION \ && apt-get -y autoremove \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* RUN setcap "cap_net_bind_service=+ep" /usr/bin/php8.3 RUN groupadd --force -g $WWWGROUP sail RUN useradd -ms /bin/bash --no-user-group -g $WWWGROUP -u 1337 sail COPY start-container /usr/local/bin/start-container COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf COPY php.ini /etc/php/8.3/cli/conf.d/99-sail.ini RUN chmod +x /usr/local/bin/start-container EXPOSE 8000 ENTRYPOINT ["start-container"] database/mysql/create-testing-database.sh 0000644 00000000304 15111177517 0014474 0 ustar 00 #!/usr/bin/env bash mysql --user=root --password="$MYSQL_ROOT_PASSWORD" <<-EOSQL CREATE DATABASE IF NOT EXISTS testing; GRANT ALL PRIVILEGES ON \`testing%\`.* TO '$MYSQL_USER'@'%'; EOSQL database/pgsql/create-testing-database.sql 0000644 00000000154 15111177517 0014645 0 ustar 00 SELECT 'CREATE DATABASE testing' WHERE NOT EXISTS (SELECT FROM pg_database WHERE datname = 'testing')\gexec src/Console/PublishCommand.php 0000644 00000002767 15111177517 0012375 0 ustar 00 <?php namespace Laravel\Sail\Console; use Illuminate\Console\Command; class PublishCommand extends Command { /** * The name and signature of the console command. * * @var string */ protected $signature = 'sail:publish'; /** * The console command description. * * @var string */ protected $description = 'Publish the Laravel Sail Docker files'; /** * Execute the console command. * * @return void */ public function handle() { $this->call('vendor:publish', ['--tag' => 'sail-docker']); $this->call('vendor:publish', ['--tag' => 'sail-database']); file_put_contents( $this->laravel->basePath('docker-compose.yml'), str_replace( [ './vendor/laravel/sail/runtimes/8.3', './vendor/laravel/sail/runtimes/8.2', './vendor/laravel/sail/runtimes/8.1', './vendor/laravel/sail/runtimes/8.0', './vendor/laravel/sail/database/mysql', './vendor/laravel/sail/database/pgsql' ], [ './docker/8.3', './docker/8.2', './docker/8.1', './docker/8.0', './docker/mysql', './docker/pgsql' ], file_get_contents($this->laravel->basePath('docker-compose.yml')) ) ); } } src/Console/Concerns/InteractsWithDockerComposeServices.php 0000644 00000022367 15111177517 0020212 0 ustar 00 <?php namespace Laravel\Sail\Console\Concerns; use Symfony\Component\Process\Process; use Symfony\Component\Yaml\Yaml; trait InteractsWithDockerComposeServices { /** * The available services that may be installed. * * @var array<string> */ protected $services = [ 'mysql', 'pgsql', 'mariadb', 'redis', 'memcached', 'meilisearch', 'minio', 'mailpit', 'selenium', 'soketi', ]; /** * The default services used when the user chooses non-interactive mode. * * @var string[] */ protected $defaultServices = ['mysql', 'redis', 'selenium', 'mailpit']; /** * Gather the desired Sail services using an interactive prompt. * * @return array */ protected function gatherServicesInteractively() { if (function_exists('\Laravel\Prompts\multiselect')) { return \Laravel\Prompts\multiselect( label: 'Which services would you like to install?', options: $this->services, default: ['mysql'], ); } return $this->choice('Which services would you like to install?', $this->services, 0, null, true); } /** * Build the Docker Compose file. * * @param array $services * @return void */ protected function buildDockerCompose(array $services) { $composePath = base_path('docker-compose.yml'); $compose = file_exists($composePath) ? Yaml::parseFile($composePath) : Yaml::parse(file_get_contents(__DIR__ . '/../../../stubs/docker-compose.stub')); // Adds the new services as dependencies of the laravel.test service... if (! array_key_exists('laravel.test', $compose['services'])) { $this->warn('Couldn\'t find the laravel.test service. Make sure you add ['.implode(',', $services).'] to the depends_on config.'); } else { $compose['services']['laravel.test']['depends_on'] = collect($compose['services']['laravel.test']['depends_on'] ?? []) ->merge($services) ->unique() ->values() ->all(); } // Add the services to the docker-compose.yml... collect($services) ->filter(function ($service) use ($compose) { return ! array_key_exists($service, $compose['services'] ?? []); })->each(function ($service) use (&$compose) { $compose['services'][$service] = Yaml::parseFile(__DIR__ . "/../../../stubs/{$service}.stub")[$service]; }); // Merge volumes... collect($services) ->filter(function ($service) { return in_array($service, ['mysql', 'pgsql', 'mariadb', 'redis', 'meilisearch', 'minio']); })->filter(function ($service) use ($compose) { return ! array_key_exists($service, $compose['volumes'] ?? []); })->each(function ($service) use (&$compose) { $compose['volumes']["sail-{$service}"] = ['driver' => 'local']; }); // If the list of volumes is empty, we can remove it... if (empty($compose['volumes'])) { unset($compose['volumes']); } // Replace Selenium with ARM base container on Apple Silicon... if (in_array('selenium', $services) && in_array(php_uname('m'), ['arm64', 'aarch64'])) { $compose['services']['selenium']['image'] = 'seleniarm/standalone-chromium'; } file_put_contents($this->laravel->basePath('docker-compose.yml'), Yaml::dump($compose, Yaml::DUMP_OBJECT_AS_MAP)); } /** * Replace the Host environment variables in the app's .env file. * * @param array $services * @return void */ protected function replaceEnvVariables(array $services) { $environment = file_get_contents($this->laravel->basePath('.env')); if (in_array('pgsql', $services)) { $environment = str_replace('DB_CONNECTION=mysql', "DB_CONNECTION=pgsql", $environment); $environment = str_replace('DB_HOST=127.0.0.1', "DB_HOST=pgsql", $environment); $environment = str_replace('DB_PORT=3306', "DB_PORT=5432", $environment); } elseif (in_array('mariadb', $services)) { $environment = str_replace('DB_HOST=127.0.0.1', "DB_HOST=mariadb", $environment); } else { $environment = str_replace('DB_HOST=127.0.0.1', "DB_HOST=mysql", $environment); } $environment = str_replace('DB_USERNAME=root', "DB_USERNAME=sail", $environment); $environment = preg_replace("/DB_PASSWORD=(.*)/", "DB_PASSWORD=password", $environment); if (in_array('memcached', $services)) { $environment = str_replace('MEMCACHED_HOST=127.0.0.1', 'MEMCACHED_HOST=memcached', $environment); } if (in_array('redis', $services)) { $environment = str_replace('REDIS_HOST=127.0.0.1', 'REDIS_HOST=redis', $environment); } if (in_array('meilisearch', $services)) { $environment .= "\nSCOUT_DRIVER=meilisearch"; $environment .= "\nMEILISEARCH_HOST=http://meilisearch:7700\n"; $environment .= "\nMEILISEARCH_NO_ANALYTICS=false\n"; } if (in_array('soketi', $services)) { $environment = preg_replace("/^BROADCAST_DRIVER=(.*)/m", "BROADCAST_DRIVER=pusher", $environment); $environment = preg_replace("/^PUSHER_APP_ID=(.*)/m", "PUSHER_APP_ID=app-id", $environment); $environment = preg_replace("/^PUSHER_APP_KEY=(.*)/m", "PUSHER_APP_KEY=app-key", $environment); $environment = preg_replace("/^PUSHER_APP_SECRET=(.*)/m", "PUSHER_APP_SECRET=app-secret", $environment); $environment = preg_replace("/^PUSHER_HOST=(.*)/m", "PUSHER_HOST=soketi", $environment); $environment = preg_replace("/^PUSHER_PORT=(.*)/m", "PUSHER_PORT=6001", $environment); $environment = preg_replace("/^PUSHER_SCHEME=(.*)/m", "PUSHER_SCHEME=http", $environment); $environment = preg_replace("/^VITE_PUSHER_HOST=(.*)/m", "VITE_PUSHER_HOST=localhost", $environment); } if (in_array('mailpit', $services)) { $environment = preg_replace("/^MAIL_HOST=(.*)/m", "MAIL_HOST=mailpit", $environment); } file_put_contents($this->laravel->basePath('.env'), $environment); } /** * Configure PHPUnit to use the dedicated testing database. * * @return void */ protected function configurePhpUnit() { if (! file_exists($path = $this->laravel->basePath('phpunit.xml'))) { $path = $this->laravel->basePath('phpunit.xml.dist'); } $phpunit = file_get_contents($path); $phpunit = preg_replace('/^.*DB_CONNECTION.*\n/m', '', $phpunit); $phpunit = str_replace('<!-- <env name="DB_DATABASE" value=":memory:"/> -->', '<env name="DB_DATABASE" value="testing"/>', $phpunit); file_put_contents($this->laravel->basePath('phpunit.xml'), $phpunit); } /** * Install the devcontainer.json configuration file. * * @return void */ protected function installDevContainer() { if (! is_dir($this->laravel->basePath('.devcontainer'))) { mkdir($this->laravel->basePath('.devcontainer'), 0755, true); } file_put_contents( $this->laravel->basePath('.devcontainer/devcontainer.json'), file_get_contents(__DIR__.'/../../../stubs/devcontainer.stub') ); $environment = file_get_contents($this->laravel->basePath('.env')); $environment .= "\nWWWGROUP=1000"; $environment .= "\nWWWUSER=1000\n"; file_put_contents($this->laravel->basePath('.env'), $environment); } /** * Prepare the installation by pulling and building any necessary images. * * @param array $services * @return void */ protected function prepareInstallation($services) { // Ensure docker is installed... if ($this->runCommands(['docker info > /dev/null 2>&1']) !== 0) { return; } if (count($services) > 0) { $status = $this->runCommands([ './vendor/bin/sail pull '.implode(' ', $services), ]); if ($status === 0) { $this->info('Sail images installed successfully.'); } } $status = $this->runCommands([ './vendor/bin/sail build', ]); if ($status === 0) { $this->info('Sail build successful.'); } } /** * Run the given commands. * * @param array $commands * @return int */ protected function runCommands($commands) { $process = Process::fromShellCommandline(implode(' && ', $commands), null, null, null, null); if ('\\' !== DIRECTORY_SEPARATOR && file_exists('/dev/tty') && is_readable('/dev/tty')) { try { $process->setTty(true); } catch (\RuntimeException $e) { $this->output->writeln(' <bg=yellow;fg=black> WARN </> '.$e->getMessage().PHP_EOL); } } return $process->run(function ($type, $line) { $this->output->write(' '.$line); }); } } src/Console/InstallCommand.php 0000644 00000003226 15111177517 0012364 0 ustar 00 <?php namespace Laravel\Sail\Console; use Illuminate\Console\Command; use RuntimeException; use Symfony\Component\Process\Process; class InstallCommand extends Command { use Concerns\InteractsWithDockerComposeServices; /** * The name and signature of the console command. * * @var string */ protected $signature = 'sail:install {--with= : The services that should be included in the installation} {--devcontainer : Create a .devcontainer configuration directory}'; /** * The console command description. * * @var string */ protected $description = 'Install Laravel Sail\'s default Docker Compose file'; /** * Execute the console command. * * @return int|null */ public function handle() { if ($this->option('with')) { $services = $this->option('with') == 'none' ? [] : explode(',', $this->option('with')); } elseif ($this->option('no-interaction')) { $services = $this->defaultServices; } else { $services = $this->gatherServicesInteractively(); } if ($invalidServices = array_diff($services, $this->services)) { $this->error('Invalid services ['.implode(',', $invalidServices).'].'); return 1; } $this->buildDockerCompose($services); $this->replaceEnvVariables($services); $this->configurePhpUnit(); if ($this->option('devcontainer')) { $this->installDevContainer(); } $this->info('Sail scaffolding installed successfully.'); $this->prepareInstallation($services); } } src/Console/AddCommand.php 0000644 00000002727 15111177517 0011453 0 ustar 00 <?php namespace Laravel\Sail\Console; use Illuminate\Console\Command; use Laravel\Sail\Console\Concerns\InteractsWithDockerComposeServices; class AddCommand extends Command { use InteractsWithDockerComposeServices; /** * The name and signature of the console command. * * @var string */ protected $signature = 'sail:add {services? : The services that should be added} '; /** * The console command description. * * @var string */ protected $description = 'Add a service to an existing Sail installation'; /** * Execute the console command. * * @return int|null */ public function handle() { if ($this->argument('services')) { $services = $this->argument('services') == 'none' ? [] : explode(',', $this->argument('services')); } elseif ($this->option('no-interaction')) { $services = $this->defaultServices; } else { $services = $this->gatherServicesInteractively(); } if ($invalidServices = array_diff($services, $this->services)) { $this->error('Invalid services ['.implode(',', $invalidServices).'].'); return 1; } $this->buildDockerCompose($services); $this->replaceEnvVariables($services); $this->configurePhpUnit(); $this->info('Additional Sail services installed successfully.'); $this->prepareInstallation($services); } } src/SailServiceProvider.php 0000644 00000003357 15111177517 0012006 0 ustar 00 <?php namespace Laravel\Sail; use Illuminate\Contracts\Support\DeferrableProvider; use Illuminate\Support\ServiceProvider; use Laravel\Sail\Console\AddCommand; use Laravel\Sail\Console\InstallCommand; use Laravel\Sail\Console\PublishCommand; class SailServiceProvider extends ServiceProvider implements DeferrableProvider { /** * Bootstrap any application services. * * @return void */ public function boot() { $this->registerCommands(); $this->configurePublishing(); } /** * Register the console commands for the package. * * @return void */ protected function registerCommands() { if ($this->app->runningInConsole()) { $this->commands([ InstallCommand::class, AddCommand::class, PublishCommand::class, ]); } } /** * Configure publishing for the package. * * @return void */ protected function configurePublishing() { if ($this->app->runningInConsole()) { $this->publishes([ __DIR__ . '/../runtimes' => $this->app->basePath('docker'), ], ['sail', 'sail-docker']); $this->publishes([ __DIR__ . '/../bin/sail' => $this->app->basePath('sail'), ], ['sail', 'sail-bin']); $this->publishes([ __DIR__ . '/../database' => $this->app->basePath('docker'), ], ['sail', 'sail-database']); } } /** * Get the services provided by the provider. * * @return array */ public function provides() { return [ InstallCommand::class, PublishCommand::class, ]; } } src/error_log 0000644 00000001230 15111177517 0007252 0 ustar 00 [20-Nov-2025 04:59:02 UTC] PHP Fatal error: Uncaught Error: Class "Illuminate\Support\ServiceProvider" not found in /home/fluxyjvi/public_html/project/vendor/laravel/sail/src/SailServiceProvider.php:11 Stack trace: #0 {main} thrown in /home/fluxyjvi/public_html/project/vendor/laravel/sail/src/SailServiceProvider.php on line 11 [20-Nov-2025 09:33:26 UTC] PHP Fatal error: Uncaught Error: Class "Illuminate\Support\ServiceProvider" not found in /home/fluxyjvi/public_html/project/vendor/laravel/sail/src/SailServiceProvider.php:11 Stack trace: #0 {main} thrown in /home/fluxyjvi/public_html/project/vendor/laravel/sail/src/SailServiceProvider.php on line 11 README.md 0000644 00000003722 15111177517 0006035 0 ustar 00 <p align="center"><img src="https://github.com/laravel/sail/raw/HEAD/art/logo.svg" alt="Logo Laravel Sail"></p> <p align="center"> <a href="https://packagist.org/packages/laravel/sail"> <img src="https://img.shields.io/packagist/dt/laravel/sail" alt="Total Downloads"> </a> <a href="https://packagist.org/packages/laravel/sail"> <img src="https://img.shields.io/packagist/v/laravel/sail" alt="Latest Stable Version"> </a> <a href="https://packagist.org/packages/laravel/sail"> <img src="https://img.shields.io/packagist/l/laravel/sail" alt="License"> </a> </p> ## Introduction Sail provides a Docker powered local development experience for Laravel that is compatible with macOS, Windows (WSL2), and Linux. Other than Docker, no software or libraries are required to be installed on your local computer before using Sail. Sail's simple CLI means you can start building your Laravel application without any previous Docker experience. #### Inspiration Laravel Sail is inspired by and derived from [Vessel](https://github.com/shipping-docker/vessel) by [Chris Fidao](https://github.com/fideloper). If you're looking for a thorough introduction to Docker, check out Chris' course: [Shipping Docker](https://serversforhackers.com/shipping-docker). ## Official Documentation Documentation for Sail can be found on the [Laravel website](https://laravel.com/docs/sail). ## Contributing Thank you for considering contributing to Sail! You can read the contribution guide [here](.github/CONTRIBUTING.md). ## Code of Conduct In order to ensure that the Laravel community is welcoming to all, please review and abide by the [Code of Conduct](https://laravel.com/docs/contributions#code-of-conduct). ## Security Vulnerabilities Please review [our security policy](https://github.com/laravel/sail/security/policy) on how to report security vulnerabilities. ## License Laravel Sail is open-sourced software licensed under the [MIT license](LICENSE.md). bin/sail 0000644 00000041607 15111177517 0006205 0 ustar 00 #!/usr/bin/env bash UNAMEOUT="$(uname -s)" # Verify operating system is supported... case "${UNAMEOUT}" in Linux*) MACHINE=linux;; Darwin*) MACHINE=mac;; *) MACHINE="UNKNOWN" esac if [ "$MACHINE" == "UNKNOWN" ]; then echo "Unsupported operating system [$(uname -s)]. Laravel Sail supports macOS, Linux, and Windows (WSL2)." >&2 exit 1 fi # Determine if stdout is a terminal... if test -t 1; then # Determine if colors are supported... ncolors=$(tput colors) if test -n "$ncolors" && test "$ncolors" -ge 8; then BOLD="$(tput bold)" YELLOW="$(tput setaf 3)" GREEN="$(tput setaf 2)" NC="$(tput sgr0)" fi fi # Function that prints the available commands... function display_help { echo "Laravel Sail" echo echo "${YELLOW}Usage:${NC}" >&2 echo " sail COMMAND [options] [arguments]" echo echo "Unknown commands are passed to the docker-compose binary." echo echo "${YELLOW}docker-compose Commands:${NC}" echo " ${GREEN}sail up${NC} Start the application" echo " ${GREEN}sail up -d${NC} Start the application in the background" echo " ${GREEN}sail stop${NC} Stop the application" echo " ${GREEN}sail restart${NC} Restart the application" echo " ${GREEN}sail ps${NC} Display the status of all containers" echo echo "${YELLOW}Artisan Commands:${NC}" echo " ${GREEN}sail artisan ...${NC} Run an Artisan command" echo " ${GREEN}sail artisan queue:work${NC}" echo echo "${YELLOW}PHP Commands:${NC}" echo " ${GREEN}sail php ...${NC} Run a snippet of PHP code" echo " ${GREEN}sail php -v${NC}" echo echo "${YELLOW}Composer Commands:${NC}" echo " ${GREEN}sail composer ...${NC} Run a Composer command" echo " ${GREEN}sail composer require laravel/sanctum${NC}" echo echo "${YELLOW}Node Commands:${NC}" echo " ${GREEN}sail node ...${NC} Run a Node command" echo " ${GREEN}sail node --version${NC}" echo echo "${YELLOW}NPM Commands:${NC}" echo " ${GREEN}sail npm ...${NC} Run a npm command" echo " ${GREEN}sail npx${NC} Run a npx command" echo " ${GREEN}sail npm run prod${NC}" echo echo "${YELLOW}PNPM Commands:${NC}" echo " ${GREEN}sail pnpm ...${NC} Run a pnpm command" echo " ${GREEN}sail pnpx${NC} Run a pnpx command" echo " ${GREEN}sail pnpm run prod${NC}" echo echo "${YELLOW}Yarn Commands:${NC}" echo " ${GREEN}sail yarn ...${NC} Run a Yarn command" echo " ${GREEN}sail yarn run prod${NC}" echo echo "${YELLOW}Bun Commands:${NC}" echo " ${GREEN}sail bun ...${NC} Run a bun command" echo " ${GREEN}sail bunx${NC} Run a bunx command" echo " ${GREEN}sail bun run prod${NC}" echo echo "${YELLOW}Database Commands:${NC}" echo " ${GREEN}sail mysql${NC} Start a MySQL CLI session within the 'mysql' container" echo " ${GREEN}sail mariadb${NC} Start a MySQL CLI session within the 'mariadb' container" echo " ${GREEN}sail psql${NC} Start a PostgreSQL CLI session within the 'pgsql' container" echo " ${GREEN}sail redis${NC} Start a Redis CLI session within the 'redis' container" echo echo "${YELLOW}Debugging:${NC}" echo " ${GREEN}sail debug ...${NC} Run an Artisan command in debug mode" echo " ${GREEN}sail debug queue:work${NC}" echo echo "${YELLOW}Running Tests:${NC}" echo " ${GREEN}sail test${NC} Run the PHPUnit tests via the Artisan test command" echo " ${GREEN}sail phpunit ...${NC} Run PHPUnit" echo " ${GREEN}sail pest ...${NC} Run Pest" echo " ${GREEN}sail pint ...${NC} Run Pint" echo " ${GREEN}sail dusk${NC} Run the Dusk tests (Requires the laravel/dusk package)" echo " ${GREEN}sail dusk:fails${NC} Re-run previously failed Dusk tests (Requires the laravel/dusk package)" echo echo "${YELLOW}Container CLI:${NC}" echo " ${GREEN}sail shell${NC} Start a shell session within the application container" echo " ${GREEN}sail bash${NC} Alias for 'sail shell'" echo " ${GREEN}sail root-shell${NC} Start a root shell session within the application container" echo " ${GREEN}sail root-bash${NC} Alias for 'sail root-shell'" echo " ${GREEN}sail tinker${NC} Start a new Laravel Tinker session" echo echo "${YELLOW}Sharing:${NC}" echo " ${GREEN}sail share${NC} Share the application publicly via a temporary URL" echo " ${GREEN}sail open${NC} Open the site in your browser" echo echo "${YELLOW}Binaries:${NC}" echo " ${GREEN}sail bin ...${NC} Run Composer binary scripts from the vendor/bin directory" echo echo "${YELLOW}Customization:${NC}" echo " ${GREEN}sail artisan sail:publish${NC} Publish the Sail configuration files" echo " ${GREEN}sail build --no-cache${NC} Rebuild all of the Sail containers" exit 1 } # Proxy the "help" command... if [ $# -gt 0 ]; then if [ "$1" == "help" ] || [ "$1" == "-h" ] || [ "$1" == "-help" ] || [ "$1" == "--help" ]; then display_help fi else display_help fi # Source the ".env" file so Laravel's environment variables are available... if [ ! -z "$APP_ENV" ] && [ -f ./.env.$APP_ENV ]; then source ./.env.$APP_ENV; elif [ -f ./.env ]; then source ./.env; fi # Define environment variables... export APP_PORT=${APP_PORT:-80} export APP_SERVICE=${APP_SERVICE:-"laravel.test"} export DB_PORT=${DB_PORT:-3306} export WWWUSER=${WWWUSER:-$UID} export WWWGROUP=${WWWGROUP:-$(id -g)} export SAIL_FILES=${SAIL_FILES:-""} export SAIL_SHARE_DASHBOARD=${SAIL_SHARE_DASHBOARD:-4040} export SAIL_SHARE_SERVER_HOST=${SAIL_SHARE_SERVER_HOST:-"laravel-sail.site"} export SAIL_SHARE_SERVER_PORT=${SAIL_SHARE_SERVER_PORT:-8080} export SAIL_SHARE_SUBDOMAIN=${SAIL_SHARE_SUBDOMAIN:-""} export SAIL_SHARE_DOMAIN=${SAIL_SHARE_DOMAIN:-"$SAIL_SHARE_SERVER_HOST"} export SAIL_SHARE_SERVER=${SAIL_SHARE_SERVER:-""} # Function that outputs Sail is not running... function sail_is_not_running { echo "${BOLD}Sail is not running.${NC}" >&2 echo "" >&2 echo "${BOLD}You may Sail using the following commands:${NC} './vendor/bin/sail up' or './vendor/bin/sail up -d'" >&2 exit 1 } # Define Docker Compose command prefix... docker compose &> /dev/null if [ $? == 0 ]; then DOCKER_COMPOSE=(docker compose) else DOCKER_COMPOSE=(docker-compose) fi if [ -n "$SAIL_FILES" ]; then # Convert SAIL_FILES to an array... IFS=':' read -ra SAIL_FILES <<< "$SAIL_FILES" for FILE in "${SAIL_FILES[@]}"; do if [ -f "$FILE" ]; then DOCKER_COMPOSE+=(-f "$FILE") else echo "${BOLD}Unable to find Docker Compose file: '${FILE}'${NC}" >&2 exit 1 fi done fi EXEC="yes" if [ -z "$SAIL_SKIP_CHECKS" ]; then # Ensure that Docker is running... if ! docker info > /dev/null 2>&1; then echo "${BOLD}Docker is not running.${NC}" >&2 exit 1 fi # Determine if Sail is currently up... if "${DOCKER_COMPOSE[@]}" ps "$APP_SERVICE" 2>&1 | grep 'Exit\|exited'; then echo "${BOLD}Shutting down old Sail processes...${NC}" >&2 "${DOCKER_COMPOSE[@]}" down > /dev/null 2>&1 EXEC="no" elif [ -z "$("${DOCKER_COMPOSE[@]}" ps -q)" ]; then EXEC="no" fi fi ARGS=() # Proxy PHP commands to the "php" binary on the application container... if [ "$1" == "php" ]; then shift 1 if [ "$EXEC" == "yes" ]; then ARGS+=(exec -u sail) [ ! -t 0 ] && ARGS+=(-T) ARGS+=("$APP_SERVICE" "php" "$@") else sail_is_not_running fi # Proxy vendor binary commands on the application container... elif [ "$1" == "bin" ]; then shift 1 if [ "$EXEC" == "yes" ]; then ARGS+=(exec -u sail) [ ! -t 0 ] && ARGS+=(-T) ARGS+=("$APP_SERVICE" ./vendor/bin/"$@") else sail_is_not_running fi # Proxy docker-compose commands to the docker-compose binary on the application container... elif [ "$1" == "docker-compose" ]; then shift 1 if [ "$EXEC" == "yes" ]; then ARGS+=(exec -u sail) [ ! -t 0 ] && ARGS+=(-T) ARGS+=("$APP_SERVICE" "${DOCKER_COMPOSE[@]}") else sail_is_not_running fi # Proxy Composer commands to the "composer" binary on the application container... elif [ "$1" == "composer" ]; then shift 1 if [ "$EXEC" == "yes" ]; then ARGS+=(exec -u sail) [ ! -t 0 ] && ARGS+=(-T) ARGS+=("$APP_SERVICE" "composer" "$@") else sail_is_not_running fi # Proxy Artisan commands to the "artisan" binary on the application container... elif [ "$1" == "artisan" ] || [ "$1" == "art" ] || [ "$1" == "a" ]; then shift 1 if [ "$EXEC" == "yes" ]; then ARGS+=(exec -u sail) [ ! -t 0 ] && ARGS+=(-T) ARGS+=("$APP_SERVICE" php artisan "$@") else sail_is_not_running fi # Proxy the "debug" command to the "php artisan" binary on the application container with xdebug enabled... elif [ "$1" == "debug" ]; then shift 1 if [ "$EXEC" == "yes" ]; then ARGS+=(exec -u sail -e XDEBUG_SESSION=1) [ ! -t 0 ] && ARGS+=(-T) ARGS+=("$APP_SERVICE" php artisan "$@") else sail_is_not_running fi # Proxy the "test" command to the "php artisan test" Artisan command... elif [ "$1" == "test" ]; then shift 1 if [ "$EXEC" == "yes" ]; then ARGS+=(exec -u sail) [ ! -t 0 ] && ARGS+=(-T) ARGS+=("$APP_SERVICE" php artisan test "$@") else sail_is_not_running fi # Proxy the "phpunit" command to "php vendor/bin/phpunit"... elif [ "$1" == "phpunit" ]; then shift 1 if [ "$EXEC" == "yes" ]; then ARGS+=(exec -u sail) [ ! -t 0 ] && ARGS+=(-T) ARGS+=("$APP_SERVICE" php vendor/bin/phpunit "$@") else sail_is_not_running fi # Proxy the "pest" command to "php vendor/bin/pest"... elif [ "$1" == "pest" ]; then shift 1 if [ "$EXEC" == "yes" ]; then ARGS+=(exec -u sail) [ ! -t 0 ] && ARGS+=(-T) ARGS+=("$APP_SERVICE" php vendor/bin/pest "$@") else sail_is_not_running fi # Proxy the "pint" command to "php vendor/bin/pint"... elif [ "$1" == "pint" ]; then shift 1 if [ "$EXEC" == "yes" ]; then ARGS+=(exec -u sail) [ ! -t 0 ] && ARGS+=(-T) ARGS+=("$APP_SERVICE" php vendor/bin/pint "$@") else sail_is_not_running fi # Proxy the "dusk" command to the "php artisan dusk" Artisan command... elif [ "$1" == "dusk" ]; then shift 1 if [ "$EXEC" == "yes" ]; then ARGS+=(exec -u sail) [ ! -t 0 ] && ARGS+=(-T) ARGS+=(-e "APP_URL=http://${APP_SERVICE}") ARGS+=(-e "DUSK_DRIVER_URL=http://selenium:4444/wd/hub") ARGS+=("$APP_SERVICE" php artisan dusk "$@") else sail_is_not_running fi # Proxy the "dusk:fails" command to the "php artisan dusk:fails" Artisan command... elif [ "$1" == "dusk:fails" ]; then shift 1 if [ "$EXEC" == "yes" ]; then ARGS+=(exec -u sail) [ ! -t 0 ] && ARGS+=(-T) ARGS+=(-e "APP_URL=http://${APP_SERVICE}") ARGS+=(-e "DUSK_DRIVER_URL=http://selenium:4444/wd/hub") ARGS+=("$APP_SERVICE" php artisan dusk:fails "$@") else sail_is_not_running fi # Initiate a Laravel Tinker session within the application container... elif [ "$1" == "tinker" ] ; then shift 1 if [ "$EXEC" == "yes" ]; then ARGS+=(exec -u sail) [ ! -t 0 ] && ARGS+=(-T) ARGS+=("$APP_SERVICE" php artisan tinker) else sail_is_not_running fi # Proxy Node commands to the "node" binary on the application container... elif [ "$1" == "node" ]; then shift 1 if [ "$EXEC" == "yes" ]; then ARGS+=(exec -u sail) [ ! -t 0 ] && ARGS+=(-T) ARGS+=("$APP_SERVICE" node "$@") else sail_is_not_running fi # Proxy NPM commands to the "npm" binary on the application container... elif [ "$1" == "npm" ]; then shift 1 if [ "$EXEC" == "yes" ]; then ARGS+=(exec -u sail) [ ! -t 0 ] && ARGS+=(-T) ARGS+=("$APP_SERVICE" npm "$@") else sail_is_not_running fi # Proxy NPX commands to the "npx" binary on the application container... elif [ "$1" == "npx" ]; then shift 1 if [ "$EXEC" == "yes" ]; then ARGS+=(exec -u sail) [ ! -t 0 ] && ARGS+=(-T) ARGS+=("$APP_SERVICE" npx "$@") else sail_is_not_running fi # Proxy PNPM commands to the "pnpm" binary on the application container... elif [ "$1" == "pnpm" ]; then shift 1 if [ "$EXEC" == "yes" ]; then ARGS+=(exec -u sail) [ ! -t 0 ] && ARGS+=(-T) ARGS+=("$APP_SERVICE" pnpm "$@") else sail_is_not_running fi # Proxy PNPX commands to the "pnpx" binary on the application container... elif [ "$1" == "pnpx" ]; then shift 1 if [ "$EXEC" == "yes" ]; then ARGS+=(exec -u sail) [ ! -t 0 ] && ARGS+=(-T) ARGS+=("$APP_SERVICE" pnpx "$@") else sail_is_not_running fi # Proxy YARN commands to the "yarn" binary on the application container... elif [ "$1" == "yarn" ]; then shift 1 if [ "$EXEC" == "yes" ]; then ARGS+=(exec -u sail) [ ! -t 0 ] && ARGS+=(-T) ARGS+=("$APP_SERVICE" yarn "$@") else sail_is_not_running fi # Proxy Bun commands to the "bun" binary on the application container... elif [ "$1" == "bun" ]; then shift 1 if [ "$EXEC" == "yes" ]; then ARGS+=(exec -u sail) [ ! -t 0 ] && ARGS+=(-T) ARGS+=("$APP_SERVICE" bun "$@") else sail_is_not_running fi # Proxy Bun X commands to the "bunx" binary on the application container... elif [ "$1" == "bunx" ]; then shift 1 if [ "$EXEC" == "yes" ]; then ARGS+=(exec -u sail) [ ! -t 0 ] && ARGS+=(-T) ARGS+=("$APP_SERVICE" bunx "$@") else sail_is_not_running fi # Initiate a MySQL CLI terminal session within the "mysql" container... elif [ "$1" == "mysql" ]; then shift 1 if [ "$EXEC" == "yes" ]; then ARGS+=(exec) [ ! -t 0 ] && ARGS+=(-T) ARGS+=(mysql bash -c) ARGS+=("MYSQL_PWD=\${MYSQL_PASSWORD} mysql -u \${MYSQL_USER} \${MYSQL_DATABASE}") else sail_is_not_running fi # Initiate a MySQL CLI terminal session within the "mariadb" container... elif [ "$1" == "mariadb" ]; then shift 1 if [ "$EXEC" == "yes" ]; then ARGS+=(exec) [ ! -t 0 ] && ARGS+=(-T) ARGS+=(mariadb bash -c) ARGS+=("MYSQL_PWD=\${MYSQL_PASSWORD} mysql -u \${MYSQL_USER} \${MYSQL_DATABASE}") else sail_is_not_running fi # Initiate a PostgreSQL CLI terminal session within the "pgsql" container... elif [ "$1" == "psql" ]; then shift 1 if [ "$EXEC" == "yes" ]; then ARGS+=(exec) [ ! -t 0 ] && ARGS+=(-T) ARGS+=(pgsql bash -c) ARGS+=("PGPASSWORD=\${PGPASSWORD} psql -U \${POSTGRES_USER} \${POSTGRES_DB}") else sail_is_not_running fi # Initiate a Bash shell within the application container... elif [ "$1" == "shell" ] || [ "$1" == "bash" ]; then shift 1 if [ "$EXEC" == "yes" ]; then ARGS+=(exec -u sail) [ ! -t 0 ] && ARGS+=(-T) ARGS+=("$APP_SERVICE" bash "$@") else sail_is_not_running fi # Initiate a root user Bash shell within the application container... elif [ "$1" == "root-shell" ] || [ "$1" == "root-bash" ]; then shift 1 if [ "$EXEC" == "yes" ]; then ARGS+=(exec) [ ! -t 0 ] && ARGS+=(-T) ARGS+=("$APP_SERVICE" bash "$@") else sail_is_not_running fi # Initiate a Redis CLI terminal session within the "redis" container... elif [ "$1" == "redis" ] ; then shift 1 if [ "$EXEC" == "yes" ]; then ARGS+=(exec) [ ! -t 0 ] && ARGS+=(-T) ARGS+=(redis redis-cli) else sail_is_not_running fi # Share the site... elif [ "$1" == "share" ]; then shift 1 if [ "$EXEC" == "yes" ]; then docker run --init --rm -p "$SAIL_SHARE_DASHBOARD":4040 -t beyondcodegmbh/expose-server:latest share http://host.docker.internal:"$APP_PORT" \ --server-host="$SAIL_SHARE_SERVER_HOST" \ --server-port="$SAIL_SHARE_SERVER_PORT" \ --auth="$SAIL_SHARE_TOKEN" \ --server="$SAIL_SHARE_SERVER" \ --subdomain="$SAIL_SHARE_SUBDOMAIN" \ --domain="$SAIL_SHARE_DOMAIN" \ "$@" exit else sail_is_not_running fi # Open the site... elif [ "$1" == "open" ]; then shift 1 if [ "$EXEC" == "yes" ]; then open $APP_URL exit else sail_is_not_running fi # Pass unknown commands to the "docker-compose" binary... else ARGS+=("$@") fi # Run Docker Compose with the defined arguments... "${DOCKER_COMPOSE[@]}" "${ARGS[@]}" composer.json 0000644 00000002325 15111177517 0007276 0 ustar 00 { "name": "laravel/sail", "description": "Docker files for running a basic Laravel application.", "keywords": ["laravel", "docker"], "license": "MIT", "support": { "issues": "https://github.com/laravel/sail/issues", "source": "https://github.com/laravel/sail" }, "authors": [ { "name": "Taylor Otwell", "email": "taylor@laravel.com" } ], "require": { "php": "^8.0", "illuminate/console": "^9.0|^10.0|^11.0", "illuminate/contracts": "^9.0|^10.0|^11.0", "illuminate/support": "^9.0|^10.0|^11.0", "symfony/yaml": "^6.0|^7.0" }, "bin": [ "bin/sail" ], "autoload": { "psr-4": { "Laravel\\Sail\\": "src/" } }, "extra": { "branch-alias": { "dev-master": "1.x-dev" }, "laravel": { "providers": [ "Laravel\\Sail\\SailServiceProvider" ] } }, "config": { "sort-packages": true }, "minimum-stability": "dev", "prefer-stable": true, "require-dev": { "orchestra/testbench": "^7.0|^8.0|^9.0", "phpstan/phpstan": "^1.10" } } LICENSE.md 0000644 00000002117 15111177517 0006157 0 ustar 00 The MIT License (MIT) Copyright (c) Taylor Otwell Copyright (c) Chris Fidao Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. stubs/minio.stub 0000644 00000001001 15111177517 0007714 0 ustar 00 minio: image: 'minio/minio:latest' ports: - '${FORWARD_MINIO_PORT:-9000}:9000' - '${FORWARD_MINIO_CONSOLE_PORT:-8900}:8900' environment: MINIO_ROOT_USER: 'sail' MINIO_ROOT_PASSWORD: 'password' volumes: - 'sail-minio:/data/minio' networks: - sail command: minio server /data/minio --console-address ":8900" healthcheck: test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"] retries: 3 timeout: 5s stubs/mailpit.stub 0000644 00000000275 15111177517 0010254 0 ustar 00 mailpit: image: 'axllent/mailpit:latest' ports: - '${FORWARD_MAILPIT_PORT:-1025}:1025' - '${FORWARD_MAILPIT_DASHBOARD_PORT:-8025}:8025' networks: - sail stubs/meilisearch.stub 0000644 00000000654 15111177517 0011103 0 ustar 00 meilisearch: image: 'getmeili/meilisearch:latest' ports: - '${FORWARD_MEILISEARCH_PORT:-7700}:7700' environment: MEILI_NO_ANALYTICS: '${MEILISEARCH_NO_ANALYTICS:-false}' volumes: - 'sail-meilisearch:/meili_data' networks: - sail healthcheck: test: ["CMD", "wget", "--no-verbose", "--spider", "http://localhost:7700/health"] retries: 3 timeout: 5s stubs/pgsql.stub 0000644 00000001211 15111177517 0007732 0 ustar 00 pgsql: image: 'postgres:15' ports: - '${FORWARD_DB_PORT:-5432}:5432' environment: PGPASSWORD: '${DB_PASSWORD:-secret}' POSTGRES_DB: '${DB_DATABASE}' POSTGRES_USER: '${DB_USERNAME}' POSTGRES_PASSWORD: '${DB_PASSWORD:-secret}' volumes: - 'sail-pgsql:/var/lib/postgresql/data' - './vendor/laravel/sail/database/pgsql/create-testing-database.sql:/docker-entrypoint-initdb.d/10-create-testing-database.sql' networks: - sail healthcheck: test: ["CMD", "pg_isready", "-q", "-d", "${DB_DATABASE}", "-U", "${DB_USERNAME}"] retries: 3 timeout: 5s stubs/mysql.stub 0000644 00000001247 15111177517 0007762 0 ustar 00 mysql: image: 'mysql/mysql-server:8.0' ports: - '${FORWARD_DB_PORT:-3306}:3306' environment: MYSQL_ROOT_PASSWORD: '${DB_PASSWORD}' MYSQL_ROOT_HOST: "%" MYSQL_DATABASE: '${DB_DATABASE}' MYSQL_USER: '${DB_USERNAME}' MYSQL_PASSWORD: '${DB_PASSWORD}' MYSQL_ALLOW_EMPTY_PASSWORD: 1 volumes: - 'sail-mysql:/var/lib/mysql' - './vendor/laravel/sail/database/mysql/create-testing-database.sh:/docker-entrypoint-initdb.d/10-create-testing-database.sh' networks: - sail healthcheck: test: ["CMD", "mysqladmin", "ping", "-p${DB_PASSWORD}"] retries: 3 timeout: 5s stubs/soketi.stub 0000644 00000000677 15111177517 0010121 0 ustar 00 soketi: image: 'quay.io/soketi/soketi:latest-16-alpine' environment: SOKETI_DEBUG: '${SOKETI_DEBUG:-1}' SOKETI_METRICS_SERVER_PORT: '9601' SOKETI_DEFAULT_APP_ID: '${PUSHER_APP_ID}' SOKETI_DEFAULT_APP_KEY: '${PUSHER_APP_KEY}' SOKETI_DEFAULT_APP_SECRET: '${PUSHER_APP_SECRET}' ports: - '${PUSHER_PORT:-6001}:6001' - '${PUSHER_METRICS_PORT:-9601}:9601' networks: - sail stubs/redis.stub 0000644 00000000403 15111177517 0007714 0 ustar 00 redis: image: 'redis:alpine' ports: - '${FORWARD_REDIS_PORT:-6379}:6379' volumes: - 'sail-redis:/data' networks: - sail healthcheck: test: ["CMD", "redis-cli", "ping"] retries: 3 timeout: 5s stubs/devcontainer.stub 0000644 00000001221 15111177517 0011266 0 ustar 00 // https://aka.ms/devcontainer.json { "name": "Existing Docker Compose (Extend)", "dockerComposeFile": [ "../docker-compose.yml" ], "service": "laravel.test", "workspaceFolder": "/var/www/html", "customizations": { "vscode": { "extensions": [ // "mikestead.dotenv", // "amiralizadeh9480.laravel-extra-intellisense", // "ryannaddy.laravel-artisan", // "onecentlin.laravel5-snippets", // "onecentlin.laravel-blade" ], "settings": {} } }, "remoteUser": "sail", "postCreateCommand": "chown -R 1000:1000 /var/www/html 2>/dev/null || true" // "forwardPorts": [], // "runServices": [], // "shutdownAction": "none", } stubs/mariadb.stub 0000644 00000001243 15111177517 0010210 0 ustar 00 mariadb: image: 'mariadb:10' ports: - '${FORWARD_DB_PORT:-3306}:3306' environment: MYSQL_ROOT_PASSWORD: '${DB_PASSWORD}' MYSQL_ROOT_HOST: "%" MYSQL_DATABASE: '${DB_DATABASE}' MYSQL_USER: '${DB_USERNAME}' MYSQL_PASSWORD: '${DB_PASSWORD}' MYSQL_ALLOW_EMPTY_PASSWORD: 'yes' volumes: - 'sail-mariadb:/var/lib/mysql' - './vendor/laravel/sail/database/mysql/create-testing-database.sh:/docker-entrypoint-initdb.d/10-create-testing-database.sh' networks: - sail healthcheck: test: ["CMD", "mysqladmin", "ping", "-p${DB_PASSWORD}"] retries: 3 timeout: 5s stubs/memcached.stub 0000644 00000000204 15111177517 0010513 0 ustar 00 memcached: image: 'memcached:alpine' ports: - '${FORWARD_MEMCACHED_PORT:-11211}:11211' networks: - sail stubs/selenium.stub 0000644 00000000271 15111177517 0010432 0 ustar 00 selenium: image: 'selenium/standalone-chrome' extra_hosts: - 'host.docker.internal:host-gateway' volumes: - '/dev/shm:/dev/shm' networks: - sail stubs/docker-compose.stub 0000644 00000001516 15111177517 0011526 0 ustar 00 # For more information: https://laravel.com/docs/sail services: laravel.test: build: context: ./vendor/laravel/sail/runtimes/8.2 dockerfile: Dockerfile args: WWWGROUP: '${WWWGROUP}' image: sail-8.2/app extra_hosts: - 'host.docker.internal:host-gateway' ports: - '${APP_PORT:-80}:80' - '${VITE_PORT:-5173}:${VITE_PORT:-5173}' environment: WWWUSER: '${WWWUSER}' LARAVEL_SAIL: 1 XDEBUG_MODE: '${SAIL_XDEBUG_MODE:-off}' XDEBUG_CONFIG: '${SAIL_XDEBUG_CONFIG:-client_host=host.docker.internal}' IGNITION_LOCAL_SITES_PATH: '${PWD}' volumes: - '.:/var/www/html' networks: - sail networks: sail: driver: bridge home/fluxyjvi/public_html/project/vendor/laravel/sail/bin/sail 0000644 00000041607 15111237475 0020640 0 ustar 00 #!/usr/bin/env bash UNAMEOUT="$(uname -s)" # Verify operating system is supported... case "${UNAMEOUT}" in Linux*) MACHINE=linux;; Darwin*) MACHINE=mac;; *) MACHINE="UNKNOWN" esac if [ "$MACHINE" == "UNKNOWN" ]; then echo "Unsupported operating system [$(uname -s)]. Laravel Sail supports macOS, Linux, and Windows (WSL2)." >&2 exit 1 fi # Determine if stdout is a terminal... if test -t 1; then # Determine if colors are supported... ncolors=$(tput colors) if test -n "$ncolors" && test "$ncolors" -ge 8; then BOLD="$(tput bold)" YELLOW="$(tput setaf 3)" GREEN="$(tput setaf 2)" NC="$(tput sgr0)" fi fi # Function that prints the available commands... function display_help { echo "Laravel Sail" echo echo "${YELLOW}Usage:${NC}" >&2 echo " sail COMMAND [options] [arguments]" echo echo "Unknown commands are passed to the docker-compose binary." echo echo "${YELLOW}docker-compose Commands:${NC}" echo " ${GREEN}sail up${NC} Start the application" echo " ${GREEN}sail up -d${NC} Start the application in the background" echo " ${GREEN}sail stop${NC} Stop the application" echo " ${GREEN}sail restart${NC} Restart the application" echo " ${GREEN}sail ps${NC} Display the status of all containers" echo echo "${YELLOW}Artisan Commands:${NC}" echo " ${GREEN}sail artisan ...${NC} Run an Artisan command" echo " ${GREEN}sail artisan queue:work${NC}" echo echo "${YELLOW}PHP Commands:${NC}" echo " ${GREEN}sail php ...${NC} Run a snippet of PHP code" echo " ${GREEN}sail php -v${NC}" echo echo "${YELLOW}Composer Commands:${NC}" echo " ${GREEN}sail composer ...${NC} Run a Composer command" echo " ${GREEN}sail composer require laravel/sanctum${NC}" echo echo "${YELLOW}Node Commands:${NC}" echo " ${GREEN}sail node ...${NC} Run a Node command" echo " ${GREEN}sail node --version${NC}" echo echo "${YELLOW}NPM Commands:${NC}" echo " ${GREEN}sail npm ...${NC} Run a npm command" echo " ${GREEN}sail npx${NC} Run a npx command" echo " ${GREEN}sail npm run prod${NC}" echo echo "${YELLOW}PNPM Commands:${NC}" echo " ${GREEN}sail pnpm ...${NC} Run a pnpm command" echo " ${GREEN}sail pnpx${NC} Run a pnpx command" echo " ${GREEN}sail pnpm run prod${NC}" echo echo "${YELLOW}Yarn Commands:${NC}" echo " ${GREEN}sail yarn ...${NC} Run a Yarn command" echo " ${GREEN}sail yarn run prod${NC}" echo echo "${YELLOW}Bun Commands:${NC}" echo " ${GREEN}sail bun ...${NC} Run a bun command" echo " ${GREEN}sail bunx${NC} Run a bunx command" echo " ${GREEN}sail bun run prod${NC}" echo echo "${YELLOW}Database Commands:${NC}" echo " ${GREEN}sail mysql${NC} Start a MySQL CLI session within the 'mysql' container" echo " ${GREEN}sail mariadb${NC} Start a MySQL CLI session within the 'mariadb' container" echo " ${GREEN}sail psql${NC} Start a PostgreSQL CLI session within the 'pgsql' container" echo " ${GREEN}sail redis${NC} Start a Redis CLI session within the 'redis' container" echo echo "${YELLOW}Debugging:${NC}" echo " ${GREEN}sail debug ...${NC} Run an Artisan command in debug mode" echo " ${GREEN}sail debug queue:work${NC}" echo echo "${YELLOW}Running Tests:${NC}" echo " ${GREEN}sail test${NC} Run the PHPUnit tests via the Artisan test command" echo " ${GREEN}sail phpunit ...${NC} Run PHPUnit" echo " ${GREEN}sail pest ...${NC} Run Pest" echo " ${GREEN}sail pint ...${NC} Run Pint" echo " ${GREEN}sail dusk${NC} Run the Dusk tests (Requires the laravel/dusk package)" echo " ${GREEN}sail dusk:fails${NC} Re-run previously failed Dusk tests (Requires the laravel/dusk package)" echo echo "${YELLOW}Container CLI:${NC}" echo " ${GREEN}sail shell${NC} Start a shell session within the application container" echo " ${GREEN}sail bash${NC} Alias for 'sail shell'" echo " ${GREEN}sail root-shell${NC} Start a root shell session within the application container" echo " ${GREEN}sail root-bash${NC} Alias for 'sail root-shell'" echo " ${GREEN}sail tinker${NC} Start a new Laravel Tinker session" echo echo "${YELLOW}Sharing:${NC}" echo " ${GREEN}sail share${NC} Share the application publicly via a temporary URL" echo " ${GREEN}sail open${NC} Open the site in your browser" echo echo "${YELLOW}Binaries:${NC}" echo " ${GREEN}sail bin ...${NC} Run Composer binary scripts from the vendor/bin directory" echo echo "${YELLOW}Customization:${NC}" echo " ${GREEN}sail artisan sail:publish${NC} Publish the Sail configuration files" echo " ${GREEN}sail build --no-cache${NC} Rebuild all of the Sail containers" exit 1 } # Proxy the "help" command... if [ $# -gt 0 ]; then if [ "$1" == "help" ] || [ "$1" == "-h" ] || [ "$1" == "-help" ] || [ "$1" == "--help" ]; then display_help fi else display_help fi # Source the ".env" file so Laravel's environment variables are available... if [ ! -z "$APP_ENV" ] && [ -f ./.env.$APP_ENV ]; then source ./.env.$APP_ENV; elif [ -f ./.env ]; then source ./.env; fi # Define environment variables... export APP_PORT=${APP_PORT:-80} export APP_SERVICE=${APP_SERVICE:-"laravel.test"} export DB_PORT=${DB_PORT:-3306} export WWWUSER=${WWWUSER:-$UID} export WWWGROUP=${WWWGROUP:-$(id -g)} export SAIL_FILES=${SAIL_FILES:-""} export SAIL_SHARE_DASHBOARD=${SAIL_SHARE_DASHBOARD:-4040} export SAIL_SHARE_SERVER_HOST=${SAIL_SHARE_SERVER_HOST:-"laravel-sail.site"} export SAIL_SHARE_SERVER_PORT=${SAIL_SHARE_SERVER_PORT:-8080} export SAIL_SHARE_SUBDOMAIN=${SAIL_SHARE_SUBDOMAIN:-""} export SAIL_SHARE_DOMAIN=${SAIL_SHARE_DOMAIN:-"$SAIL_SHARE_SERVER_HOST"} export SAIL_SHARE_SERVER=${SAIL_SHARE_SERVER:-""} # Function that outputs Sail is not running... function sail_is_not_running { echo "${BOLD}Sail is not running.${NC}" >&2 echo "" >&2 echo "${BOLD}You may Sail using the following commands:${NC} './vendor/bin/sail up' or './vendor/bin/sail up -d'" >&2 exit 1 } # Define Docker Compose command prefix... docker compose &> /dev/null if [ $? == 0 ]; then DOCKER_COMPOSE=(docker compose) else DOCKER_COMPOSE=(docker-compose) fi if [ -n "$SAIL_FILES" ]; then # Convert SAIL_FILES to an array... IFS=':' read -ra SAIL_FILES <<< "$SAIL_FILES" for FILE in "${SAIL_FILES[@]}"; do if [ -f "$FILE" ]; then DOCKER_COMPOSE+=(-f "$FILE") else echo "${BOLD}Unable to find Docker Compose file: '${FILE}'${NC}" >&2 exit 1 fi done fi EXEC="yes" if [ -z "$SAIL_SKIP_CHECKS" ]; then # Ensure that Docker is running... if ! docker info > /dev/null 2>&1; then echo "${BOLD}Docker is not running.${NC}" >&2 exit 1 fi # Determine if Sail is currently up... if "${DOCKER_COMPOSE[@]}" ps "$APP_SERVICE" 2>&1 | grep 'Exit\|exited'; then echo "${BOLD}Shutting down old Sail processes...${NC}" >&2 "${DOCKER_COMPOSE[@]}" down > /dev/null 2>&1 EXEC="no" elif [ -z "$("${DOCKER_COMPOSE[@]}" ps -q)" ]; then EXEC="no" fi fi ARGS=() # Proxy PHP commands to the "php" binary on the application container... if [ "$1" == "php" ]; then shift 1 if [ "$EXEC" == "yes" ]; then ARGS+=(exec -u sail) [ ! -t 0 ] && ARGS+=(-T) ARGS+=("$APP_SERVICE" "php" "$@") else sail_is_not_running fi # Proxy vendor binary commands on the application container... elif [ "$1" == "bin" ]; then shift 1 if [ "$EXEC" == "yes" ]; then ARGS+=(exec -u sail) [ ! -t 0 ] && ARGS+=(-T) ARGS+=("$APP_SERVICE" ./vendor/bin/"$@") else sail_is_not_running fi # Proxy docker-compose commands to the docker-compose binary on the application container... elif [ "$1" == "docker-compose" ]; then shift 1 if [ "$EXEC" == "yes" ]; then ARGS+=(exec -u sail) [ ! -t 0 ] && ARGS+=(-T) ARGS+=("$APP_SERVICE" "${DOCKER_COMPOSE[@]}") else sail_is_not_running fi # Proxy Composer commands to the "composer" binary on the application container... elif [ "$1" == "composer" ]; then shift 1 if [ "$EXEC" == "yes" ]; then ARGS+=(exec -u sail) [ ! -t 0 ] && ARGS+=(-T) ARGS+=("$APP_SERVICE" "composer" "$@") else sail_is_not_running fi # Proxy Artisan commands to the "artisan" binary on the application container... elif [ "$1" == "artisan" ] || [ "$1" == "art" ] || [ "$1" == "a" ]; then shift 1 if [ "$EXEC" == "yes" ]; then ARGS+=(exec -u sail) [ ! -t 0 ] && ARGS+=(-T) ARGS+=("$APP_SERVICE" php artisan "$@") else sail_is_not_running fi # Proxy the "debug" command to the "php artisan" binary on the application container with xdebug enabled... elif [ "$1" == "debug" ]; then shift 1 if [ "$EXEC" == "yes" ]; then ARGS+=(exec -u sail -e XDEBUG_SESSION=1) [ ! -t 0 ] && ARGS+=(-T) ARGS+=("$APP_SERVICE" php artisan "$@") else sail_is_not_running fi # Proxy the "test" command to the "php artisan test" Artisan command... elif [ "$1" == "test" ]; then shift 1 if [ "$EXEC" == "yes" ]; then ARGS+=(exec -u sail) [ ! -t 0 ] && ARGS+=(-T) ARGS+=("$APP_SERVICE" php artisan test "$@") else sail_is_not_running fi # Proxy the "phpunit" command to "php vendor/bin/phpunit"... elif [ "$1" == "phpunit" ]; then shift 1 if [ "$EXEC" == "yes" ]; then ARGS+=(exec -u sail) [ ! -t 0 ] && ARGS+=(-T) ARGS+=("$APP_SERVICE" php vendor/bin/phpunit "$@") else sail_is_not_running fi # Proxy the "pest" command to "php vendor/bin/pest"... elif [ "$1" == "pest" ]; then shift 1 if [ "$EXEC" == "yes" ]; then ARGS+=(exec -u sail) [ ! -t 0 ] && ARGS+=(-T) ARGS+=("$APP_SERVICE" php vendor/bin/pest "$@") else sail_is_not_running fi # Proxy the "pint" command to "php vendor/bin/pint"... elif [ "$1" == "pint" ]; then shift 1 if [ "$EXEC" == "yes" ]; then ARGS+=(exec -u sail) [ ! -t 0 ] && ARGS+=(-T) ARGS+=("$APP_SERVICE" php vendor/bin/pint "$@") else sail_is_not_running fi # Proxy the "dusk" command to the "php artisan dusk" Artisan command... elif [ "$1" == "dusk" ]; then shift 1 if [ "$EXEC" == "yes" ]; then ARGS+=(exec -u sail) [ ! -t 0 ] && ARGS+=(-T) ARGS+=(-e "APP_URL=http://${APP_SERVICE}") ARGS+=(-e "DUSK_DRIVER_URL=http://selenium:4444/wd/hub") ARGS+=("$APP_SERVICE" php artisan dusk "$@") else sail_is_not_running fi # Proxy the "dusk:fails" command to the "php artisan dusk:fails" Artisan command... elif [ "$1" == "dusk:fails" ]; then shift 1 if [ "$EXEC" == "yes" ]; then ARGS+=(exec -u sail) [ ! -t 0 ] && ARGS+=(-T) ARGS+=(-e "APP_URL=http://${APP_SERVICE}") ARGS+=(-e "DUSK_DRIVER_URL=http://selenium:4444/wd/hub") ARGS+=("$APP_SERVICE" php artisan dusk:fails "$@") else sail_is_not_running fi # Initiate a Laravel Tinker session within the application container... elif [ "$1" == "tinker" ] ; then shift 1 if [ "$EXEC" == "yes" ]; then ARGS+=(exec -u sail) [ ! -t 0 ] && ARGS+=(-T) ARGS+=("$APP_SERVICE" php artisan tinker) else sail_is_not_running fi # Proxy Node commands to the "node" binary on the application container... elif [ "$1" == "node" ]; then shift 1 if [ "$EXEC" == "yes" ]; then ARGS+=(exec -u sail) [ ! -t 0 ] && ARGS+=(-T) ARGS+=("$APP_SERVICE" node "$@") else sail_is_not_running fi # Proxy NPM commands to the "npm" binary on the application container... elif [ "$1" == "npm" ]; then shift 1 if [ "$EXEC" == "yes" ]; then ARGS+=(exec -u sail) [ ! -t 0 ] && ARGS+=(-T) ARGS+=("$APP_SERVICE" npm "$@") else sail_is_not_running fi # Proxy NPX commands to the "npx" binary on the application container... elif [ "$1" == "npx" ]; then shift 1 if [ "$EXEC" == "yes" ]; then ARGS+=(exec -u sail) [ ! -t 0 ] && ARGS+=(-T) ARGS+=("$APP_SERVICE" npx "$@") else sail_is_not_running fi # Proxy PNPM commands to the "pnpm" binary on the application container... elif [ "$1" == "pnpm" ]; then shift 1 if [ "$EXEC" == "yes" ]; then ARGS+=(exec -u sail) [ ! -t 0 ] && ARGS+=(-T) ARGS+=("$APP_SERVICE" pnpm "$@") else sail_is_not_running fi # Proxy PNPX commands to the "pnpx" binary on the application container... elif [ "$1" == "pnpx" ]; then shift 1 if [ "$EXEC" == "yes" ]; then ARGS+=(exec -u sail) [ ! -t 0 ] && ARGS+=(-T) ARGS+=("$APP_SERVICE" pnpx "$@") else sail_is_not_running fi # Proxy YARN commands to the "yarn" binary on the application container... elif [ "$1" == "yarn" ]; then shift 1 if [ "$EXEC" == "yes" ]; then ARGS+=(exec -u sail) [ ! -t 0 ] && ARGS+=(-T) ARGS+=("$APP_SERVICE" yarn "$@") else sail_is_not_running fi # Proxy Bun commands to the "bun" binary on the application container... elif [ "$1" == "bun" ]; then shift 1 if [ "$EXEC" == "yes" ]; then ARGS+=(exec -u sail) [ ! -t 0 ] && ARGS+=(-T) ARGS+=("$APP_SERVICE" bun "$@") else sail_is_not_running fi # Proxy Bun X commands to the "bunx" binary on the application container... elif [ "$1" == "bunx" ]; then shift 1 if [ "$EXEC" == "yes" ]; then ARGS+=(exec -u sail) [ ! -t 0 ] && ARGS+=(-T) ARGS+=("$APP_SERVICE" bunx "$@") else sail_is_not_running fi # Initiate a MySQL CLI terminal session within the "mysql" container... elif [ "$1" == "mysql" ]; then shift 1 if [ "$EXEC" == "yes" ]; then ARGS+=(exec) [ ! -t 0 ] && ARGS+=(-T) ARGS+=(mysql bash -c) ARGS+=("MYSQL_PWD=\${MYSQL_PASSWORD} mysql -u \${MYSQL_USER} \${MYSQL_DATABASE}") else sail_is_not_running fi # Initiate a MySQL CLI terminal session within the "mariadb" container... elif [ "$1" == "mariadb" ]; then shift 1 if [ "$EXEC" == "yes" ]; then ARGS+=(exec) [ ! -t 0 ] && ARGS+=(-T) ARGS+=(mariadb bash -c) ARGS+=("MYSQL_PWD=\${MYSQL_PASSWORD} mysql -u \${MYSQL_USER} \${MYSQL_DATABASE}") else sail_is_not_running fi # Initiate a PostgreSQL CLI terminal session within the "pgsql" container... elif [ "$1" == "psql" ]; then shift 1 if [ "$EXEC" == "yes" ]; then ARGS+=(exec) [ ! -t 0 ] && ARGS+=(-T) ARGS+=(pgsql bash -c) ARGS+=("PGPASSWORD=\${PGPASSWORD} psql -U \${POSTGRES_USER} \${POSTGRES_DB}") else sail_is_not_running fi # Initiate a Bash shell within the application container... elif [ "$1" == "shell" ] || [ "$1" == "bash" ]; then shift 1 if [ "$EXEC" == "yes" ]; then ARGS+=(exec -u sail) [ ! -t 0 ] && ARGS+=(-T) ARGS+=("$APP_SERVICE" bash "$@") else sail_is_not_running fi # Initiate a root user Bash shell within the application container... elif [ "$1" == "root-shell" ] || [ "$1" == "root-bash" ]; then shift 1 if [ "$EXEC" == "yes" ]; then ARGS+=(exec) [ ! -t 0 ] && ARGS+=(-T) ARGS+=("$APP_SERVICE" bash "$@") else sail_is_not_running fi # Initiate a Redis CLI terminal session within the "redis" container... elif [ "$1" == "redis" ] ; then shift 1 if [ "$EXEC" == "yes" ]; then ARGS+=(exec) [ ! -t 0 ] && ARGS+=(-T) ARGS+=(redis redis-cli) else sail_is_not_running fi # Share the site... elif [ "$1" == "share" ]; then shift 1 if [ "$EXEC" == "yes" ]; then docker run --init --rm -p "$SAIL_SHARE_DASHBOARD":4040 -t beyondcodegmbh/expose-server:latest share http://host.docker.internal:"$APP_PORT" \ --server-host="$SAIL_SHARE_SERVER_HOST" \ --server-port="$SAIL_SHARE_SERVER_PORT" \ --auth="$SAIL_SHARE_TOKEN" \ --server="$SAIL_SHARE_SERVER" \ --subdomain="$SAIL_SHARE_SUBDOMAIN" \ --domain="$SAIL_SHARE_DOMAIN" \ "$@" exit else sail_is_not_running fi # Open the site... elif [ "$1" == "open" ]; then shift 1 if [ "$EXEC" == "yes" ]; then open $APP_URL exit else sail_is_not_running fi # Pass unknown commands to the "docker-compose" binary... else ARGS+=("$@") fi # Run Docker Compose with the defined arguments... "${DOCKER_COMPOSE[@]}" "${ARGS[@]}"
Simpan