项目作者: kayvank

项目描述 :
simple scala http4s app deployed to GCP k8 using GCP cloudbuild
高级语言: Scala
项目地址: git://github.com/kayvank/guest-book.git
创建时间: 2019-01-11T00:29:31Z
项目社区:https://github.com/kayvank/guest-book

开源协议:

下载


guest-book

Logs guess books entries

Getting started

Prerequisites

The following are required

  • JDK11
  • sbt
  • docker

Installing

To install, test and run first clone the repo, next:

  1. sbt test run
  2. sbt run

Integration tests

  • Build the docker image
  • Run the docker image
  • Execute the integration tests

From project root folder:

  1. docker build -t kayvank/guest-book:v1.00123 .
  2. docker run -p9000:9000 kayvank/guest-book:v1.00123

From a separate terminal:

  1. ./integration-test.sh

Note this is a very simple integration test.

Deployment

This application is deployed to k8 cluster using cloud-build

URLs

Usage

  • To post logs:
    1. curl -v -k -i \
    2. -H "Accept: application/json" \
    3. -H "Content-Type: application/json" \
    4. -X POST -d \
    5. '{"name": "John Doe", "message": "Hello from John Doe!"}' \
    6. https://guest-book.tk/v1/log
  • To fetch logs
    1. curl -v -k https://www.guest-book.tk/v1/log

Build With

the project is build inside a docker container. This will allow us to simplify CI and take advantage of