Skip to content

Serving Wordpress and React behind Varnish, powered by Docker.

Notifications You must be signed in to change notification settings

e10jon/coderintros

Repository files navigation





What is this?

It's the code that powers coderintros.com. View it, fork it, learn from it, help make it better, or do none of those at all.

Look, I just want a profile on coderintros.com

No problem! Head on over to our suggestion page. No shame in suggesting yourself, I promise.

How to run locally

How to deploy

Sign up for an AWS account, then do the following:

  • Create an RDS instance.
  • Create an Elastic Beanstalk application and environment, specifying all the environment variables from docker-compose.yml.
    • Use the AWS console, or eb create prod --elb-type application --sample -i t2.micro -k coderintros --platform "multi-container-docker-1.12.6-(generic)" -pr --vpc.id REPLACE_ME --vpc.ec2subnets REPLACE_ME,REPLACE_ME --vpc.elbpublic --vpc.publicip --vpc.elbsubnets REPLACE_ME,REPLACE_ME
  • In ECS, create repositories named react, wordpress, and varnish.
  • Create an Elastic IP and assign it to your Elastic Beanstalk instance.
    • Add the AmazonEC2FullAccess role to aws-elasticbeanstalk-ec2-role so that you can assign the Elastic IP address to your instance.
  • Create a Code Pipeline project, pulling from Github, running CodeBuild, deploying to Elastic Beanstalk.
    • Define AWS_REGION, AWS_ACCOUNT_ID, BUILD_BUCKET, PURGERS_ACL, and anything in react/env-config.js environment variables in CodeBuild.
    • Upload gcloud-service-account.json to the BUILD_BUCKET S3 folder
    • Add the AmazonEC2ContainerRegistryFullAccess and AmazonS3ReadOnlyAccess policies to IAM role code-build-coderintros-service-role.
  • Push to Github and watch the magic happen!

In production

To let you know about some awesome businesses (and so that I don't forget about my accounts there) here are all the services that coderintros.com relies on: