Skip to content

dturbay/dynamodb_web_app

Repository files navigation

Original source code link

Added:

  • Structured logs (based on logback) (TODO: consider to use standard appenders for structued logging that comes with log4j2/logback)
  • CI (build and push image on push on tags events) .github/workflows/docker-image.yml
  • AWS ECS cluster provisioning and app deployment cdk script setup-infra
    • cdk deploy / cdk destroy

Useful links

Commands

  • Run app locally
    • local mode (text log format) mvn spring-boot:run -Dspring-boot.run.jvmArguments="-Dspring.profiles.active=local"
    • prod mode (json log) mvn spring-boot:run
  • docker build -t tda_dynamo_web_app ./
  • curl -X POST -H "Content-Type: application/json" -d '{"name": "dennis", "guide": "Dynamodb basics", "description": "Create sample dynamo db app", "status": "IN_PROGRESS"}' http://localhost:8080/api/items
  • curl -X POST -H "Content-Type: application/json" -d '{"name": "dennis", "guide": "Kubernetes basics", "description": "Create sample kubernetes app", "status": "IN_PROGRESS"}' http://localhost:8080/api/items
  • curl -s http://localhost:8080/api/items | jq