forked from github.com/plausible-hosting
Initial commit
This commit is contained in:
commit
c0fcca12ac
12
README.md
Normal file
12
README.md
Normal file
@ -0,0 +1,12 @@
|
||||
# Plausible Analytics setup examples
|
||||
|
||||
This repository acts as a a template to get up and running with [Plausible Analytics](https://github.com/plausible/analytics).
|
||||
|
||||
### How to use
|
||||
|
||||
Find instructions on how to run Plausible Analytics Self Hosted [in our docs](https://docs.plausible.io/self-hosting).
|
||||
|
||||
### Contributing
|
||||
|
||||
We are always looking to expand on the options and setups provided here. Feel free to open an issue or PR if you feel
|
||||
something could be improved.
|
52
docker-compose.yml
Normal file
52
docker-compose.yml
Normal file
@ -0,0 +1,52 @@
|
||||
version: "3.3"
|
||||
services:
|
||||
mail:
|
||||
image: bytemark/smtp
|
||||
restart: always
|
||||
|
||||
plausible_db:
|
||||
image: postgres:12
|
||||
volumes:
|
||||
- db-data:/var/lib/postgresql/data
|
||||
environment:
|
||||
- POSTGRES_PASSWORD=postgres
|
||||
ports:
|
||||
- 5432:5432
|
||||
|
||||
plausible_events_db:
|
||||
image: yandex/clickhouse-server:latest
|
||||
volumes:
|
||||
- event-data:/var/lib/clickhouse
|
||||
ulimits:
|
||||
nofile:
|
||||
soft: 262144
|
||||
hard: 262144
|
||||
ports:
|
||||
- 8123:8123
|
||||
|
||||
plausible:
|
||||
#image: plausible/analytics
|
||||
build:
|
||||
context: ../plausible
|
||||
dockerfile: ./Dockerfile
|
||||
command: sh -c "sleep 10 && /entrypoint.sh db createdb && /entrypoint.sh db migrate && /entrypoint.sh run"
|
||||
depends_on:
|
||||
- plausible_db
|
||||
- plausible_events_db
|
||||
- mail
|
||||
ports:
|
||||
- 80:8000
|
||||
links:
|
||||
- plausible_db
|
||||
- plausible_events_db
|
||||
- mail
|
||||
env_file:
|
||||
- plausible-conf.env
|
||||
|
||||
volumes:
|
||||
db-data:
|
||||
driver: local
|
||||
event-data:
|
||||
driver: local
|
||||
geoip:
|
||||
driver: local
|
25
geoip/docker-compose.geoip.yml
Normal file
25
geoip/docker-compose.geoip.yml
Normal file
@ -0,0 +1,25 @@
|
||||
version: "3.3"
|
||||
services:
|
||||
plausible:
|
||||
depends_on:
|
||||
- geoip
|
||||
links:
|
||||
- geoip
|
||||
environment:
|
||||
- GEOLITE2_COUNTRY_DB=/geoip/GeoLite2-Country.mmdb
|
||||
|
||||
geoip:
|
||||
image: maxmindinc/geoipupdate
|
||||
ports:
|
||||
- 1080:1080
|
||||
environment:
|
||||
- GEOIPUPDATE_EDITION_IDS=GeoLite2-Country
|
||||
- GEOIPUPDATE_FREQUENCY=168 # update every 7 days
|
||||
env_file:
|
||||
geoip/geoip.conf
|
||||
volumes:
|
||||
- geoip:/usr/share/GeoIP
|
||||
|
||||
volumes:
|
||||
geoip:
|
||||
driver: local
|
2
geoip/geoip.conf
Normal file
2
geoip/geoip.conf
Normal file
@ -0,0 +1,2 @@
|
||||
GEOIPUPDATE_ACCOUNT_ID=<your-account-id>
|
||||
GEOIPUPDATE_LICENSE_KEY=<your-license-key>
|
4
plausible-conf.env
Normal file
4
plausible-conf.env
Normal file
@ -0,0 +1,4 @@
|
||||
ADMIN_USER_EMAIL={replace-me}
|
||||
ADMIN_USER_NAME={replace-me}
|
||||
ADMIN_USER_PWD={replace-me}
|
||||
SECRET_KEY_BASE={replace-me}
|
Loading…
Reference in New Issue
Block a user