/fast-curious-laravel-apprunner

This is simply a show off the AWS App Runner service.

Primary LanguagePHP

ci-build

Deploy Laravel as an AppRunner

This is simply a show off the AWS App Runner service.

How to:

Create a IAM User

https://us-east-1.console.aws.amazon.com/iamv2/home?region=eu-central-1#/users

image

Get IAM User Access Key and Secret Key

https://us-east-1.console.aws.amazon.com/iamv2/home?region=eu-central-1#/users/details/tempuser?section=security_credentials

image

Set the keys in to the Github repo settings

https://github.com/antonio8101/fast-curious-laravel-apprunner/settings/secrets/actions

image

Grant User permission/policy to push

https://us-east-1.console.aws.amazon.com/iamv2/home#/users/details/tempuser?section=permissions

image

{
	"Version": "2012-10-17",
	"Statement": [
		{
			"Sid": "Statement1",
			"Effect": "Allow",
			"Action": [
				"ecr:CompleteLayerUpload",
				"ecr:UploadLayerPart",
				"ecr:InitiateLayerUpload",
				"ecr:BatchCheckLayerAvailability",
				"ecr:PutImage",
				"ecr:BatchGetImage"
			],
			"Resource": "arn:aws:ecr:{ECR-REGION}:{AWS-ACCOUNT}:repository/{REPO-NAME}"
		},
		{
			"Sid": "Statement2",
			"Effect": "Allow",
			"Action": [
				"ecr:GetAuthorizationToken"
			],
			"Resource": "*"
		}
	]
}

Create the Elastic Container Registry

https://eu-central-1.console.aws.amazon.com/ecr/repositories?region=eu-central-1

image

Create a Dockerfile for you .env

https://github.com/antonio8101/fast-curious-laravel-apprunner/blob/main/Dockerfile

Create a Github workflow

https://github.com/antonio8101/fast-curious-laravel-apprunner/blob/main/.github/workflows/ci.yml

Fast-curious-laravel-apprunner is based on Laravel

Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experience to be truly fulfilling. Laravel takes the pain out of development by easing common tasks used in many web projects, such as:

Simple, fast routing engine. Powerful dependency injection container. Multiple back-ends for session and cache storage. Expressive, intuitive database ORM. Database agnostic schema migrations. Robust background job processing. Real-time event broadcasting. Laravel is accessible, powerful, and provides tools required for large, robust applications.