This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # A list of servers, one per line | |
| SERVER_LIST='/home/vagrant/servers' | |
| # Options for ssh command | |
| SSH_OPTIONS="-o ConnectTimeout=2" | |
| usage() { | |
| # Display the usage and exit | |
| echo " Usage: ${0} [-nsv] [-f FILE] COMMAND" >&2 | |
| echo " Execute command as single command on every server." >&2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Functions | |
| ok() { echo -e '\e[32m'$1'\e[m'; } # Green | |
| EXPECTED_ARGS=3 | |
| E_BADARGS=65 | |
| MYSQL=`which mysql` | |
| Q1="CREATE DATABASE IF NOT EXISTS $1;" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| name=$1 | |
| WEB_ROOT_DIR=$2 | |
| email=${3-'webmaster@localhost'} | |
| sitesEnable='/etc/apache2/sites-enabled/' | |
| sitesAvailable='/etc/apache2/sites-available/' | |
| sitesAvailabledomain=$sitesAvailable$name.conf |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| COMPANY_NAME=$1 | |
| NUMBER_OF_COMPANY="${#}" | |
| if [[ "${NUMBER_OF_COMPANY}" -lt 1 ]] | |
| then | |
| echo "You must pass a company name" | |
| exit 1 | |
| fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| namespace App\Console\Commands; | |
| use Illuminate\Console\Command; | |
| use Illuminate\Support\Facades\Artisan; | |
| use Illuminate\Support\Facades\DB; | |
| class AddCompany extends Command | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| FROM php:7.2-fpm | |
| COPY . /var/www/ | |
| WORKDIR /var/www | |
| # Install dependencies | |
| RUN apt-get update && apt-get install -y \ | |
| build-essential \ | |
| libpng-dev \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| version: '3' | |
| services: | |
| web: | |
| build: . | |
| ports: | |
| - "8000:8000" | |
| container_name: app | |
| command: "php artisan serve --host=0.0.0.0 --port=8000" | |
| environment: | |
| - COMPOSE_CONVERT_WINDOWS_PATHS=1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| RUN pecl install mongodb | |
| RUN echo "extension=mongodb.so" >> /usr/local/etc/php/conf.d/mongodb.ini | |
| # RUN apt-get install php7.2-mongodb | |
| # Clear cache | |
| RUN apt-get clean && rm -rf /var/lib/apt/lists/* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| FROM alpine | |
| WORKDIR /data | |
| COPY . . | |
| CMD ls -l /data |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| version: '2' | |
| services: | |
| mysql_db_master: | |
| image: mysql:5.7 | |
| # command: --default-authentication-plugin=mysql_native_password | |
| environment: | |
| MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD} | |
| MYSQL_USER: ${MYSQL_USER} | |
| MYSQL_PASSWORD: ${MYSQL_PASSWORD} | |
| MYSQL_DATABASE: lms |