Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 11 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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}'
```

---

Expand Down Expand Up @@ -131,10 +131,14 @@ docker run -p 5000:5000 -e DATABASE_URL="postgresql://<user>@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
Expand All @@ -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).

---

Expand Down
7 changes: 7 additions & 0 deletions terraform/terraform.tfvars.example
Original file line number Diff line number Diff line change
@@ -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"