1. Create an ECR warehouse in AWS
2. Enter your own Repository. Then click View push commands
3. Remember these commands
4. Log in to AWS cloud9 and use git clone your code
5. Execute all the commands in step 3 in sequence. Finally you find that you have a docker image in your ECR
aws ecr-public get-login-password --region us-east-1 | docker login --username AWS --password-stdin public.ecr.aws/k6z2c7p9
docker build -t hackathon_repo .
docker tag hackathon_repo:latest public.ecr.aws/k6z2c7p9/hackathon_repo:latest
docker push public.ecr.aws/k6z2c7p9/hackathon_repo:latest
6. Use apprunner to create services
7. Enter the Container image URI. Leave everything else as default.
8. Wait for deployment to complete
9. ACCESS TO SERVICES
Problems encountered
1. Invalid Host header
Add the following properties to vue.config.js.
module.exports = {
devServer: {
allowedHosts: "all",
},
};