# date: january 2018
# author: Dick de Leeuw ([email protected], @leeuwd)
# prerequisites: LAMP droplet (>= 8GB RAM)
# environment: Ubuntu 16.04.3 LTS xenial, Apache/2.4.29 (Ubuntu), MySQL 5.7.21 & PHP 7.1
# create droplet
This file contains 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
<?php | |
namespace Deployer; | |
require 'recipe/symfony3.php'; | |
require 'recipe/yarn.php'; | |
// Load .env | |
$dotenv = new \Symfony\Component\Dotenv\Dotenv(); | |
$dotenv->load(__DIR__ . '/.env'); |
This file contains 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
generate(:scaffold, "post", "title:string", "body:text") | |
route "root to: 'posts#index'" | |
file 'config/database.yml', <<-CODE | |
default: &default | |
adapter: mysql | |
encoding: unicode | |
pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %> | |
host: db |