.env.production
APP_ENV=production APP_DEBUG=true APP_KEY DB_CONNECTION=mysql DB_HOST=namysql.database.windows.net DB_DATABASE=sampledb DB_USERNAME=adminuser@namysql DB_PASSWORD=hoge MYSQL_SSL=true
vagrant config/database.php
追加
'sslmode' => env('DB_SSLMODE', 'prefer'), 'options' => (env('MYSQL_SSL')) ? [ PDO::MYSQL_ATTR_SSL_KEY => '/ssl/BaltimoreCyberTrustRoot.crt.pem', ] : []
migrateします。あら、いいですね!?
php artisan migrate --env=production --force Migration table created successfully. Migrating: 2014_10_12_000000_create_users_table Migrated: 2014_10_12_000000_create_users_table Migrating: 2014_10_12_100000_create_password_resets_table Migrated: 2014_10_12_100000_create_password_resets_table Migrating: 2015_10_27_141258_create_tasks_table Migrated: 2015_10_27_141258_create_tasks_table
applicationkeyを作成
php artisan key:generate --env=production --force
vagrantでサーバーを起動する。
php artisan serve –env=production –host 0.0.0.0
!?
RuntimeException in Encrypter.php line 43:
The only supported ciphers are AES-128-CBC and AES-256-CBC with the correct key lengths.
うまくいかないので、別の方法を探します。