potz-holzoepfel-und-zipfelchape

command module
v0.3.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 8, 2021 License: AGPL-3.0 Imports: 1 Imported by: 0

README

Potz Holzöpfel und Zipfelchape

Tri Tra Trulla La!

Features

  • Hosts an embedded copy of Caasperli on port 8080
  • Available as minimal container image (FROM scratch)
  • Prometheus endpoint availabe (/metrics)
  • Supports tracing
  • May use MongoDB as persistance layer to display a simple web counter (optional)

Usage

Run an potz-holzoepfel-und-zipfelchape binary from the releases page or use the container available at ghcr.io/adfinis-sygroup/potz-holzoepfel-und-zipfelchape.

docker run --rm -ti -p 8080:8080 ghcr.io/adfinis-sygroup/potz-holzoepfel-und-zipfelchape

Get page contents:

curl localhost:8080

Get metrics:

curl localhost:8080/metrics

Running with enabled persistence

You can run Caasperli with an optional persistance layer and it will display a simple hit counter with data from MongoDB.

potz-holzoepfel-und-zipfelchape \
  --persistence
  --mongodb-uri="mongodb://root:hunter2@localhost:27017"

Persistence on Cloud Foundry

If you are running on Cloud Foundry you can activate the persistence layer by attaching a MongoDB service called mongodb to the application.

cf push caasperli --no-start
cf create-service mongodb <plan> mongodb
cf bind-service caasperli mongodb
cf start caasperli

Caasperli will detect that it is running on Cloud Foundry and automatically activate it's persistance layer if a service called mongodb is bound to the app.

Deploying with Waypoint

waypoint up

Development

Run a server.

go run main.go

Build a local copy of the server.

go build

MongoDB persistance layer

There is a docker-compose.yml to run a local MongoDB instance that works with the default settings.

docker-compose up -d
go run main.go --persistence

Release Process

Create a git tag and push it to this repo or use the git web ui.

License

This application is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, version 3 of the License.

It is heavily based on enricofoltran/simple-go-server which is licensed under the MIT license.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL