Skip to content

awconstable/teamservice

Repository files navigation

Team Service

A proof of concept service to manage a hierarchy of teams

CircleCI CodeQL codecov Libraries.io dependency status for GitHub repo dockerhub

Limitations

This application is a proof of concept, it is not production ready.

A non-exhaustive list of known limitations:

  • No security whatsoever - anonymous users can easily delete or alter all data

Dependencies

  1. MongoDB

Quick start guide

Add a team

 curl -H "Content-Type: application/json" -X POST -d '{"slug": "slug", "entityType":"APPLICATION", "name": "Entity Name"}' http://localhost:8080/v2/data/hierarchy

View and manage teams

http://localhost:8080/hierarchy_manager/


Developer guide

Compile

./mvnw clean install

Run in development

Might be -Drun.arguments - see: https://stackoverflow.com/questions/23316843/get-command-line-arguments-from-spring-bootrun

docker-compose up
./mvnw spring-boot:run -Dspring-boot.run.arguments="--spring.data.mongodb.host=<mongo host>,--spring.data.mongodb.port=<mongo port>,--spring-data.mongodb.database=<mongo db>"

Create Docker image

./mvnw compile jib:build

Run app as a Docker container

See docker-library/openjdk#135 as to why spring.boot.mongodb.. env vars don't work

docker stop teamservice
docker rm teamservice
docker pull awconstable/teamservice
docker run --name teamservice -d -p 8080:8080 --link <mongo container> -e spring_data_mongodb_host=<mongo host> -e spring_data_mongodb_port=<mongo port> -e spring_data_mongodb_database=<mondo db> awconstable/teamservice:latest