Toy project help

Hi all,

I’m still working on my Docker/Laravel setup; gave a preso yesterday about it that blew everyone away. :slight_smile: Now I’ve come up with a toy project that I think would be useful and educational. I’d like to get some ideas how to approach it.

I currently have a webapp and a Wordpress instance on an EC2 instance. We are going to move the WP site onto another EC2 instance and put both behind an ALB running WAF.

I know CloudFormation is overkill for this and I prolly should just do it at the console, but I’d like to write a template file for this. I plan on copying your php-apache template file, stripping out everything but the ALB, add in WAF (somehow) and then figure out how to connect the ALB to two existing EC2 instances (somehow).

Any guidance or tips on how to accomplish this?

Great to her that your Docker/Laravel setup is making progress!

Do you want to run WordPress on EC2 or on Fargate? If you plan to use EC2, give a try. It comes with WAF support.

The Project works a bit different than cfn-modules. Details here:

Since we have only one instance of WP for now and the foreseeable future I think Fargate would be overkill. Correct me if I’m wrong.

This does raise a design question, though: when do you spin up a new Fargate instance? Do you throw all of your Docker images onto a single Fargate instance, or do you logically segregate your Fargates: one for API interfaces, one for webapps, one for WP instances? I’m leaning towards the latter but then again, I’m a newb. :slight_smile

Not sure if I understand your question. If you have three applications, you would define 3 ECS services. One for each application.

So, if I have two APIs called and, I would have two Fargate instances. I would put them behind the same ALB somehow, right?

yes, that’s possible.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.