Dockerize Project
This commit is contained in:
commit
e679d02b41
205 changed files with 17941 additions and 0 deletions
17
bin/console
Normal file
17
bin/console
Normal file
|
@ -0,0 +1,17 @@
|
|||
#!/usr/bin/env php
|
||||
<?php
|
||||
|
||||
use App\Kernel;
|
||||
use Symfony\Bundle\FrameworkBundle\Console\Application;
|
||||
|
||||
if (!is_file(dirname(__DIR__).'/vendor/autoload_runtime.php')) {
|
||||
throw new LogicException('Symfony Runtime is missing. Try running "composer require symfony/runtime".');
|
||||
}
|
||||
|
||||
require_once dirname(__DIR__).'/vendor/autoload_runtime.php';
|
||||
|
||||
return function (array $context) {
|
||||
$kernel = new Kernel($context['APP_ENV'], (bool) $context['APP_DEBUG']);
|
||||
|
||||
return new Application($kernel);
|
||||
};
|
19
bin/phpunit
Normal file
19
bin/phpunit
Normal file
|
@ -0,0 +1,19 @@
|
|||
#!/usr/bin/env php
|
||||
<?php
|
||||
|
||||
if (!ini_get('date.timezone')) {
|
||||
ini_set('date.timezone', 'UTC');
|
||||
}
|
||||
|
||||
if (is_file(dirname(__DIR__).'/vendor/phpunit/phpunit/phpunit')) {
|
||||
define('PHPUNIT_COMPOSER_INSTALL', dirname(__DIR__).'/vendor/autoload.php');
|
||||
require PHPUNIT_COMPOSER_INSTALL;
|
||||
PHPUnit\TextUI\Command::main();
|
||||
} else {
|
||||
if (!is_file(dirname(__DIR__).'/vendor/symfony/phpunit-bridge/bin/simple-phpunit.php')) {
|
||||
echo "Unable to find the `simple-phpunit.php` script in `vendor/symfony/phpunit-bridge/bin/`.\n";
|
||||
exit(1);
|
||||
}
|
||||
|
||||
require dirname(__DIR__).'/vendor/symfony/phpunit-bridge/bin/simple-phpunit.php';
|
||||
}
|
23
bin/setup.sh
Executable file
23
bin/setup.sh
Executable file
|
@ -0,0 +1,23 @@
|
|||
#!/bin/bash
|
||||
|
||||
if [[ -z $1 ]];
|
||||
then
|
||||
echo "No argument passed. ./setup.sh {projectName}"
|
||||
exit;
|
||||
fi
|
||||
|
||||
projectName=$1
|
||||
currentProjectName=$(cut -d "=" -f 2 docker/.env)
|
||||
|
||||
sed -i "s/$currentProjectName/$projectName/g" docker/.env
|
||||
|
||||
composer install
|
||||
|
||||
cd docker || exit
|
||||
|
||||
docker-compose up -d --build
|
||||
|
||||
cd ..
|
||||
|
||||
rm -rf .git
|
||||
git init && git add . && git commit -m'Initial Commit'
|
Loading…
Add table
Add a link
Reference in a new issue