Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/riesinger/goatcounter-docker

An unofficial docker image for Goatcounter
https://github.com/riesinger/goatcounter-docker

analytics docker docker-image goatcounter

Last synced: 3 days ago
JSON representation

An unofficial docker image for Goatcounter

Awesome Lists containing this project

README

        

# Goatcounter in Docker

This is an unofficial Docker image for [Goatcounter](https://goatcounter.com), heavily based on
[baethon/docker-goatcounter](https://github.com/baethon/docker-goatcounter), but adapted to use
Goatcounter v2.

## How to use this image

```sh
docker run --name goatcounter \
-p 8080:8080 \
-v $(pwd)/db:/goatcounter/db \
-e GOATCOUNTER_DOMAIN=stats.domain.com \
-e [email protected] \
-e GOATCOUNTER_PASSWORD=pa55w0rd \
ghcr.io/riesinger/goatcounter-docker:2
```

## Environment variables

### `GOATCOUNTER_DOMAIN` · _Mandatory_

This variable is used to create the initial site. Set this to the domain you want to run Goatcounter
on.

### `GOATCOUNTER_EMAIL` · _Mandatory_

Defines the email address of the admin user. Used to sign in.

### `GOATCOUNTER_PASSWORD` · _Mandatory_

The password to use for the admin account. It is recommended to not pass this on the CLI but to read
it from a file, for example using `docker-compose`.

### `GOATCOUNTER_SMTP` · _Optional_

Sets the SMTP server to be used by the server to send emails.

Example: `smtp://user:[email protected]:587`
Default: stdout - print email contents to stdout

### `GOATCOUNTER_DB` · _Optional_

The database to use. By default, the server will use an SQLite database which is the easiest
solution.
Note that this image isn't tested for usage with PostgreSQL, but it _should_ work fine.

For persistence when using SQLite, make sure to mount a volume into `/goatcounter/db`, for example
with `docker run -v $(pwd)/db:/goatcounter/db ...`

Default: `sqlite:///goatcounter/db/goatconter.sqlite3`