-I will write the process of deploying laravel / docker on AWS for those who are stuck at the same point as the point where they are stuck.
-It will be Mac standard. -The laravel app has been pushed to git. -Docker must be installed. ・ You can log in to AWS.
・ Php7.4 ・ Mysql8.0 ・ Laravel6
Building docker @ ucan-lab's article [For beginners] Docker hands-on to build Laravel development environment at explosive speed in 20 minutes I created it with reference to.
version: "3.3"← Change services: app: build: ./infra/php volumes: - ./backend:/work web: image: nginx:1.18-alpine ports: - 10080:80 volumes: - ./backend:/work - ./infra/nginx/default.conf:/etc/nginx/conf.d/default.conf working_dir: /work
Please specify Tokyo as the region at the top right of the screen. Open the service at the top left of the screen and select EC2. If you can't find it, type "EC2" from all services to search. Click EC2 to access.
** 1: Creating a web server ** Click Launch Instance, and when the selection screen appears, click Launch Instance.
** 2: Select AMI ** Select "ubuntu 18.04" for AMI. ![Screenshot 2020-10-10 21.45.31.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/778706/b635274f-3280-5f2a-eb05- f04b02096d43.png)
** 3: Instance type selection ** Select "t2.micro", which is free for one year from new registration.
** 4: Instance details ** Proceed as standard.
** 5: Add storage ** Proceed as standard.
** 6: Add tag ** Add a tag and give the value any name you like. This time I named it "awstest". If you make one, go to the next.
** 7: Security group settings ** Set any security group name and description. This time I named it "test-docker". Added rules and added "HTTP", "HTTPS", and "Custom TCP rules". Specify the port range only for custom TCP. This time, set "10080". Set "Custom" and "0.0.0.0/0, :: / 0" for the source. After setting everything, go to the next.
** 8: Instance creation ** Click the start button.
Click the "Launch" button of the instance to display the key pair creation screen. For those who create an EC2 instance for the first time Choose to create a new key pair and give the key pair a name of your choice. ** Please be sure to download the key pair. ** </ font> Then click Create Instance.
If you return to the EC2 screen, you can see that there is an instance you created. In the place of Name, there is the name given in the tag item. When it becomes "Running" and "Passed the 2/2 check", it is complete.
Click here for more [Deploy laravel using docker on EC2 on AWS②] (https://qiita.com/JXnj8uVrUkiBh90/items/0cdac8045965e2bfffa6)
** Please point out any mistakes **