Laravel app pack template
The URL, database and deploy command of one Laravel environment, ready for tsk env.
Adds #laravel-app to the browser demo. No account.
Keys
- app_url:url
- https://app.example.com
- db_host
- db.example.internal
- db_database
- app
- db_username
- app
- db_password:secret
- (encrypted secret, masked)
- deploy_cmd:command
- php artisan deploy
Example values. Rename, add or remove keys after you create the pack.
In a task
run the migration on #laravel-app before the release @fri !1
In the terminal
tsk env laravel-app
APP_URL=https://app.example.com
DB_HOST=db.example.internal
DB_DATABASE=app
DB_USERNAME=app
DB_PASSWORD='********'
DEPLOY_CMD='php artisan deploy'The real tsk decrypts secrets on your machine and prints them.
Most Laravel projects have the same handful of values per environment: where the app lives, how to reach its database and how to deploy it. They usually end up split between a .env on someone’s laptop, a password manager and a wiki page nobody updates.
Make one pack per environment (acme-prod, acme-staging) from this template. Tag the task that touches it, and the values are one keystroke away when you get to it.
tsk env acme-prod > .env
tsk exec acme-staging -- php artisan migrate --pretend
The database password is a secret field: it is encrypted on your device before it syncs, and tsk decrypts it locally.