Skip to content

A reference to how I do my Laravel/Apache/MySQL setup using Docker and ECR

Notifications You must be signed in to change notification settings

HarryLee186/laravel-ecr-tutorial

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 

Repository files navigation

laravel-ecr-tutorial

A reference to how I do my Laravel/Apache/MySQL setup using Docker and ECR

General Overview

  1. Build Laravel/PHP & Nginx Docker images locally
  2. Push them to ECR
  3. Pull them in the docker-compose file, as well as the Docker image for MySQL
  4. Run the containers

Commands WIP

sudo docker exec -it app_container_name php artisan migrate sudo LE_DIR=./certs docker-compose -f docker-compose.prod.yml up -d sudo docker image rm imagename

Notes WIP

Need to have certs folder on the server

https://certbot.eff.org/lets-encrypt/ubuntuother-apache - Need certonly as we reference the certs in the config anyway

After adding certbot to container sudo docker exec -it site_app_1 certbot certonly

Caveats

May want to set specific AWS keys with specific permissions for pulling/pushing on ECR repos. You can do this nicely by making a new policy, this is documented in the aws folder.

Links

https://medium.com/@shakyShane/laravel-docker-part-2-preparing-for-production-9c6a024e9797

About

A reference to how I do my Laravel/Apache/MySQL setup using Docker and ECR

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published