Skip to content

Instantly share code, notes, and snippets.

@IdleMuse
Last active September 6, 2017 12:58
Show Gist options
  • Save IdleMuse/146e04b881d7174204f2f0747b1a03ee to your computer and use it in GitHub Desktop.
Save IdleMuse/146e04b881d7174204f2f0747b1a03ee to your computer and use it in GitHub Desktop.
Beanstalk deployment

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment