-
-
Save shotasenga/e22637637a6f3fe7259e497131e93e06 to your computer and use it in GitHub Desktop.
different settings for Larabel by environments (local or VM)
When I run phpunit, I want to execute PHP on the host machine but connect to the VM for DB.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
APP_ENV=local | |
APP_DEBUG=true | |
APP_KEY=lYk7nItv6vZD34lyijQcQr8Hheb9kJpT | |
## DB settings for Host | |
DB_HOST=localhost:33060 | |
DB_DATABASE=homestead | |
DB_USERNAME=homestead | |
DB_PASSWORD=secret | |
CACHE_DRIVER=file | |
SESSION_DRIVER=file | |
QUEUE_DRIVER=sync | |
MAIL_DRIVER=smtp | |
MAIL_HOST=mailtrap.io | |
MAIL_PORT=2525 | |
MAIL_USERNAME=null | |
MAIL_PASSWORD=null | |
MAIL_ENCRYPTION=null |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
ip: "192.168.10.10" | |
memory: 2048 | |
cpus: 1 | |
hostname: api | |
name: api | |
provider: virtualbox | |
authorize: ~/.ssh/my.id_rsa.pub | |
keys: | |
- ~/.ssh/my.id_rsa | |
folders: | |
- map: "/Users/senta/Dev/tovy/apps/api" | |
to: "/home/vagrant/api" | |
sites: | |
- map: homestead.app | |
to: "/home/vagrant/api/public" | |
databases: | |
- homestead | |
## DB settings for VM | |
variables: | |
- key: APP_ENV | |
value: homestead | |
- key: DB_HOST | |
value: localhost | |
- key: DB_DATABASE | |
value: homestead | |
- key: DB_USERNAME | |
value: homestead | |
- key: DB_PASSWORD | |
value: secret |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment