This is an unofficial Docker Image for running Goatcounter.
This was based on https://github.com/baethon/docker-goatcounter.
Please note that Goatcounter's author does not recommend running Goatcounter this way. I am running it successfully, but your mileage may vary.
docker run --name goatcounter \
-v ${pwd}/config:/conf
-e GOATCOUNTER_DOMAIN=stats.domain.com \
-e [email protected] \
sloped/goatcounter
This command will start a single instance with pre-configured stats.domain.com site. It will store the database under your current directory under /config in a sqlite database goatcounter.sqlite3.
version: '3.3'
services:
goatcounter:
image: sloped/goatcounter
container_name: goatcounter
volumes:
- ${pwd}/config:/conf
environment:
- GOATCOUNTER_DOMAIN=stats.domain.com
- [email protected]
Note: I do not run this so you will need to figure out the connection string. If you do please send me a PR.
version: '3.3'
services:
goatcounter:
image: sloped/goatcounter
container_name: goatcounter
volumes:
- ${pwd}/config:/conf
environment:
- GOATCOUNTER_DOMAIN=stats.domain.com
- [email protected]
- GOATCOUNTER_DB=connectionString'
depends_on:
- db
db:
image: postgres
container_name: goatcounter_db
environment:
POSTGRES_DB: goatcounter_db
POSTGRES_USER: user
POSTGRES_PASSWORD: password
volumes:
- ${pwd}/db_data:/var/lib/postgresql/data
Used to create the initial site. Default: localhost
Highly recommend you change this.
Defines the e-mail address of the admin user. Default: goatcounter@localhost
Highly recommend you change this.
Defines the password for the admin user.
Please change this or change your password in /user/auth immediatly after logging in
This optional environment variable defines the SMTP server (e.g., smtp://user:[email protected]:587) which will be used by the server.
Default: stdout - print email contents to stdout
This optional environment variable defines the location of the database. By default, the server will use SQLite database which is recommended solution.
It's possible to use the Postgres DB however, the image was not tested against it.
For persistent data be sure to add /conf as a volume.
Default: sqlite:///conf/goatconter.sqlite3
Assuming you stuck with the goatcounter name noted above.
docker exec goatcounter {cmd} or docker-compose exec goatcounter goatcounter
Please file issues on github. https://github.com/sloped/docker-goatcounter
Content type
Image
Digest
sha256:811e49171…
Size
26 MB
Last updated
over 2 years ago
docker pull sloped/goatcounter