buonzz / console-app
Boilerplate project files for creating Console Applications on executable PHAR file.
Installs: 64
Dependents: 0
Suggesters: 0
Security: 0
Stars: 7
Watchers: 2
Forks: 1
Open Issues: 1
Type:project
Requires
- php: >=5.4
- guzzlehttp/guzzle: ~6.0
- illuminate/database: ^5.0
- monolog/monolog: ^1.22
- symfony/console: ^2.2
- tightenco/collect: ^5.4
- vlucas/phpdotenv: ^2.0
Requires (Dev)
- phpunit/phpunit: ^4.0
README
If you are trying to create a new Console Application that is distributed as .phar file, this template of files will surely help you make the process a lot easier and faster.
Features
- PSR-4 autoloading compliant structure
- Unit-Testing with PHPUnit
- Comprehensive Guides and tutorial
- Easy PHAR file building process
- Eloquent ORM support
- Powered by Symfony Console
- Easy configuration via .env file
Build Environment
You need to have docker and docker-compose command installed in your local environment to build a new phar file.
Put up the server dependencies
docker-compose up -d
ssh to the container
docker-compose exec cli bash
execute the build command
cd /code
./build.sh
The compiled phar file should now be available in /code/dist/yourapp.phar
You can then upload it to your web server and let the users download/install it by:
wget http://downloads.yourdomain.com/yourapp.phar
sudo mv yourapp.phar /usr/local/bin/yourapp
chmod +x /usr/local/bin/yourapp
yourapp -V
shutdown the containers
docker-compose down