Skip to content

An unofficial docker image for Goatcounter

Notifications You must be signed in to change notification settings

riesinger/goatcounter-docker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

Goatcounter in Docker

This is an unofficial Docker image for Goatcounter, heavily based on baethon/docker-goatcounter, but adapted to use Goatcounter v2.

How to use this image

docker run --name goatcounter \
  -p 8080:8080 \
  -v $(pwd)/db:/goatcounter/db \
  -e GOATCOUNTER_DOMAIN=stats.domain.com \
  -e GOATCOUNTER_EMAIL=admin@domain.com \
  -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:pass@server.com: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

About

An unofficial docker image for Goatcounter

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project