PHP code example of vitnasinec / laravel-envoy-config
1. Go to this page and download the library: Download vitnasinec/laravel-envoy-config library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
vitnasinec / laravel-envoy-config example snippets
$envoy = new Config(
remote: new Environment(
ssh: '[email protected]',
path: '~/code/www',
storagePull: [new Storage('storage/app')],
...
),
local: new Environment(path: '/Users/me/Sites/example', db: ...),
);
$envoy = new Config(
remote: new Environment(
ssh: '[email protected]', // or the bare host, if ~/.ssh/config knows the user
port: null, // a number only to override ~/.ssh/config's port
path: '~/code/www', // project root on the server
php: 'php', // absolute paths for hosts that lack them on PATH,
composer: 'composer', // e.g. '/opt/alt/php83/usr/bin/php'
npm: 'npm', // or 'php ~/code/bin/composer'
build: true, // build assets there on deploy / code-push
deployFrom: 'main', // any other branch is asked about first
storagePull: [new Storage('storage/app')], // comes down from this remote
storagePush: [], // goes up to it
db: new Database(
database: 'example_db',
host: '127.0.0.1',
port: 3306,
username: Env::get('PROD_DB_USERNAME'), // .env
password: Env::get('PROD_DB_PASSWORD'), // .env
dumps: './storage/envoy', // where dumps are written there; the default
),
),
local: new Environment(
path: '/Users/me/Sites/example', // this project's root, here
db: new Database(
database: 'example_db',
username: Env::get('DB_USERNAME'),
password: Env::get('DB_PASSWORD'),
),
),
);
db: new Database('~/code/www/database/database.sqlite'),