Skip to content

lloydmeta/http4s-doobie-docker-scratchpad

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

http4s + doobie + docker scratchpad Build Status

My little sandbox for playing around with http4s, doobie, docker, testing, etc.

Explores:

  • Using http4s with cats-effect
  • Using doobie with cats-effect
  • Pureconfig for loading configuration
  • Flyway for handling migrations
  • Docker testkit for bringing up Docker containers on a per-test-suite basis
  • sbt-native-packager for bundling the app into a Docker image
  • sbt-docker-compose for bringing up a docker-compose environment based on the main project and a docker-compose.yml file
    • Can run the whole project from sbt via sbt dockerComposeUp (stopped via dockerComposeStop)
    • Also used for running Integration tests from a separate subproject
  • Swagger API spec w/ UI via Webjar

Usage

Docker is essential to having fun here, so go download it if you don't have it installed

Tweets API Swagger

sbt dockerComposeUp and go to the root in your browser (e.g. localhost).

Tests

  • sbt test will run normal tests
  • sbt dockerComposeTest will run integration tests
  • sbt dockerComposeUp will start a docker-compose environment that includes the web-server and dependencies.

Feedback

Help me learn ! Submit issues and PRs :)