Alter 2 files
Add .gitlab-ci.yml Add README.md
This commit is contained in:
parent
df285bde49
commit
d2f90cf82a
2 changed files with 39 additions and 0 deletions
20
.gitlab-ci.yml
Normal file
20
.gitlab-ci.yml
Normal file
|
@ -0,0 +1,20 @@
|
|||
workflow:
|
||||
rules:
|
||||
- if: '$CI_COMMIT_BRANCH == "build"'
|
||||
|
||||
stages:
|
||||
- build
|
||||
|
||||
default:
|
||||
image: docker
|
||||
services:
|
||||
- docker:dind
|
||||
|
||||
buildAndPush:
|
||||
stage: build
|
||||
before_script:
|
||||
- "echo $CI_REGISTRY_PASSWORD | docker login $CI_REGISTRY --username $CI_REGISTRY_USER --password-stdin"
|
||||
- "docker info"
|
||||
script:
|
||||
- "docker build . --file Dockerfile --tag ${CI_REGISTRY_IMAGE}:latest --tag ${CI_REGISTRY_IMAGE}:${CI_COMMIT_SHORT_SHA}"
|
||||
- "docker push --all-tags $CI_REGISTRY_IMAGE"
|
19
README.md
Normal file
19
README.md
Normal file
|
@ -0,0 +1,19 @@
|
|||
# goatcounter-forwarder
|
||||
|
||||
This is small Go app designed to sit between the Caddy webserver and [Goatcounter](https://github.com/arp242/goatcounter) to record pageviews as they happen.
|
||||
|
||||
The `forward_auth` directive is (ab)used to send a copy of each request to goatcounter-forwarder that then extracts all relevant information from the request and enqueues it for submission to a Goatcounter instance.
|
||||
|
||||
It's configured with environment variables:
|
||||
|
||||
* `GCFWD_HTTP_ADDRESS`: the HTTP address that goatcounter-forwarder should listen on (default `127.0.0.1:7000`)
|
||||
* `GCFWD_INSTANCE_ADDR`: the address of the Goatcounter instance to report statistics for (required)
|
||||
* `GCFWD_TOKEN`: a Goatcounter API token with pageview reporting access (required)
|
||||
|
||||
Once setup and running, it can be added to your Caddy config as so:
|
||||
|
||||
```
|
||||
forward_auth <goatcounter-forwarder address> {
|
||||
uri /
|
||||
}
|
||||
```
|
Loading…
Add table
Add a link
Reference in a new issue