Skip to content

Latest commit

History

History
93 lines (60 loc) · 1.48 KB

File metadata and controls

93 lines (60 loc) · 1.48 KB

Quick Start

1 — Start the backing services

docker compose up -d postgres localstack

Wait until both are healthy (about 10 seconds):

docker compose ps

2 — Terminal 1: start the API

AWS_REGION=us-east-1 \
AWS_ACCESS_KEY_ID=test \
AWS_SECRET_ACCESS_KEY=test \
SECRETS_MANAGER_ENDPOINT=http://localhost:4566 \
S3_ENDPOINT=http://localhost:4566 \
DB_SECRET_NAME=securetask/db \
JWT_SECRET_NAME=securetask/jwt \
./gradlew :api:bootRun

Ready when you see: Started SecureTaskApplication


3 — Terminal 2: start the BFF

./gradlew :bff:bootRun

Ready when you see: Tomcat started on port 8081


4 — Open the browser

http://localhost:8081

Register an account — the first user becomes ADMIN.


Ports

ServiceURLUse for
BFFhttp://localhost:8081Browser, all lab exercises
APIhttp://localhost:8080Direct curl / Postman (JWT Bearer)

Run tests

./gradlew :api:test

(Docker must be running — tests use Testcontainers for PostgreSQL.)


Stop everything

# Stop Spring Boot apps: Ctrl+C in each terminal# Stop Docker services:
docker compose down

Ports already in use?

If you see Port 8080 (or 8081) was already in use, a previous run is still alive.

Kill whatever is on those ports:

lsof -ti:8080 | xargs kill -9 2>/dev/null
lsof -ti:8081 | xargs kill -9 2>/dev/null

Then start normally again.