Steps to the Beanstalk
-
Create Beanstalk instance in AWS (make sure to select correct security group and VPN)
-
Create Database instance on RDS (with appropriate user)
-
Connect Repo to Deploybot, and Add a new Server. Select Elastic Beanstalk (NOT Amazon Web Services)
-
Select the appropriate dropdowns for your new beanstalk
-
Add Environment File, enter database details for RDS (as before)
-
Create a directory in the root of your project called
.ebextensions
-
Create (YAML) files in that directory that match:
https://github.com/bluewren/enterprise-pt/blob/develop/.ebextensions/00_logs.config
and
https://github.com/bluewren/enterprise-pt/blob/develop/.ebextensions/01_migrate.config
(indentation is important in YAML)
- It should now all just work, in theory.
Some gotchas
- RDS server is on an out-of-date MySQL version, so you (may) need the
Schema::defaultStringLength(191);
fix. - You will probably need to find a way to do initial seeding of data (ie creating a super-user) in the database. Either this can be done by adding a second command to run a seeder (bearing in mind that it'll run every deployment - maybe an 'if not present' check), or by adding it into your create_users_table migration.