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.