diff --git a/README.md b/README.md index ad11d07..8e2f837 100644 --- a/README.md +++ b/README.md @@ -97,9 +97,9 @@ poetry run python -m flask --app beer_catalog/app run --debug - Add a beer: ```sh curl -X POST http://127.0.0.1:5000/beers \ - -H "Content-Type: application/json" \ - -d '{"name": "Heineken", "style": "Lager", "abv": 5.0}' - ``` + -H "Content-Type: application/json" \ + -d '{"name": "Heineken", "style": "Lager", "abv": 5.0}' +``` --- @@ -131,10 +131,14 @@ docker run -p 5000:5000 -e DATABASE_URL="postgresql://@host.docker.interna --- -## Deploying to AWS (using Dockerfile) +## ☁️ Deploying to AWS + +> **Note:** +> An example `terraform.tfvars.example` file is provided in the `terraform/` directory. +> **Copy it to a new file called `terraform.tfvars` and update the values with your own secrets and settings before running `terraform apply`.** ### 1. Build & Push Docker Image -- Automated via GitHub Actions on push to `main`, `master`, `feature/*` branches. For production, we can use the `main` branch. (next updates would be added) +- Automated via GitHub Actions on push to `main`, `master`, `feature/*` branches. ### 2. Provision Infrastructure ```sh @@ -145,9 +149,8 @@ terraform apply ``` - All AWS resources (ECR, ECS, RDS, VPC, etc.) are created from scratch (no prebuilt modules). -### 3. App Access (using ECS Public IP) -- App will be available at the `ECS public IP` (see ECS task details in AWS Console). -For example, if the ECS public IP is `123.456.789.012`, the app will be available at `http://123.456.789.012:5000`. +### 3. App Access +- App will be available at the ECS public IP (see ECS task details in AWS Console). --- diff --git a/terraform/terraform.tfvars.example b/terraform/terraform.tfvars.example new file mode 100644 index 0000000..fdf00f8 --- /dev/null +++ b/terraform/terraform.tfvars.example @@ -0,0 +1,7 @@ +# Example terraform.tfvars file for testing/demo purposes only. +# Replace these values with your own secrets for real deployments. + +db_password = "examplepassword" +app_image = "123456789012.dkr.ecr.us-east-1.amazonaws.com/beer-catalog-app:latest" +# Add other variables as needed, e.g.: +# aws_region = "us-east-1" \ No newline at end of file