Base repository for a Laravel 5.8 application over docker compose.
Contains all needed files to mount a environment over docker with the following applications:
- php-fpm
- nginx
- postgres
- redis
- laravel-echo
- workspace:
- nodejs
- composer
- laravel
Based on Laradock project, release v5.5.4.
To config the project, execute:
./bin/config
After config, to start the Laravel application, execute:
./bin/up
The ./bin
folder has several helper scripts.
- Run a artisan command
./bin/artisan list
- Install all composer dependencies
./bin/composer-install
- Require a list of packages from composer
./bin/composer-require laravel/passport laravel/horizon
- Update composer packages
./bin/composer-update
- Config the application environment
./bin/config
- Configure access rights to storage path
./bin/config-storage
-
Stop the application environment
./bin/down
-
Stop the application environment and kill orphans containers
./bin/down --remove-orphans
-
Execute a command inside a container
./bin/exec workspace bash
./bin/exec php-fpm sh
-
Show all logs of containers
./bin/logs
-
Show logs from a specific container
./bin/logs php-fpm
- Execute database migrations
./bin/migrate
- Execute database migrations and seeders
./bin/migrate-and-seed
- Run a npm transpilation for a dev environment
./bin/npm-dev
-
Install node dependencies
./bin/npm-install
-
Install a list of node dependencies
./bin/npm-install moment axios
- Run a npm transpilation for a production environment
./bin/npm-prod
- Wath files modifications to run a npm transpilation for a dev environment
./bin/npm-watch
- Show status from all containers
./bin/ps
- Restart the application environment
./bin/restart
-
Execute dusk tests
./bin/run-dusk-tests
-
Execute dusk tests with filter
./bin/run-dusk-tests --filter test_if_runs
-
Execute dusk tests for a group
./bin/run-dusk-tests --group crud
-
Execute all PHPUnit tests
./bin/run-tests
-
Execute tests with filter
./bin/run-tests --filter test_if_runs
-
Execute tests for a group
./bin/run-tests --group crud
-
Enter into Postgres console
./bin/sql
-
Execute a sql query
./bin/sql "select * from users"
-
Start the application environment
./bin/up
-
Start the a list of containers
./bin/up workspace database
- Show the versions from Laravel, Node, NPM and Postgres
./bin/version
-
Enter into workspace container with Laradock user
./bin/workspace
-
Enter into workspace container with root user
./bin/workspace root