135 lines
6.3 KiB
YAML
135 lines
6.3 KiB
YAML
captainVersion: 4
|
|
|
|
services:
|
|
$$cap_appname-mail:
|
|
image: bytemark/smtp
|
|
restart: always
|
|
environment:
|
|
RELAY_HOST: $$cap_RELAY_HOST
|
|
RELAY_PORT: $$cap_RELAY_PORT
|
|
RELAY_USERNAME: $$cap_RELAY_USERNAME
|
|
RELAY_PASSWORD: $$cap_RELAY_PASSWORD
|
|
caproverExtra:
|
|
notExposeAsWebApp: 'true'
|
|
|
|
$$cap_appname-postgres:
|
|
image: postgres:$$cap_POSTGRES_VERSION
|
|
volumes:
|
|
- $$cap_appname-postgres-data:/var/lib/postgresql/data
|
|
environment:
|
|
POSTGRES_USER: plausible
|
|
POSTGRES_PASSWORD: $$cap_POSTGRES_PASSWORD
|
|
caproverExtra:
|
|
notExposeAsWebApp: 'true'
|
|
|
|
$$cap_appname-clickhouse:
|
|
image: yandex/clickhouse-server:$$cap_CLICKHOUSE_VERSION
|
|
volumes:
|
|
- $$cap_appname-clickhouse-data:/var/lib/clickhouse
|
|
caproverExtra:
|
|
notExposeAsWebApp: 'true'
|
|
|
|
$$cap_appname:
|
|
depends_on:
|
|
- $$cap_appname-postgres
|
|
- $$cap_appname-clickhouse
|
|
- $$cap_appname-mail
|
|
caproverExtra:
|
|
containerHttpPort: '8000'
|
|
dockerfileLines:
|
|
- FROM plausible/analytics:$$cap_PLAUSIBLE_VERSION
|
|
- CMD ["sh", "-c", "sleep 10 && /entrypoint.sh db createdb && /entrypoint.sh db migrate && /entrypoint.sh db init-admin && /entrypoint.sh run"]
|
|
environment:
|
|
ADMIN_USER_EMAIL: $$cap_ADMIN_USER_EMAIL
|
|
ADMIN_USER_NAME: $$cap_ADMIN_USER_NAME
|
|
ADMIN_USER_PWD: $$cap_ADMIN_USER_PWD
|
|
BASE_URL: http://$$cap_appname.$$cap_root_domain
|
|
DATABASE_URL: postgres://plausible:$$cap_POSTGRES_PASSWORD@srv-captain--$$cap_appname-postgres:5432/plausible
|
|
CLICKHOUSE_DATABASE_URL: http://srv-captain--$$cap_appname-clickhouse:8123/plausible
|
|
SECRET_KEY_BASE: $$cap_gen_random_hex(64)
|
|
SIGNING_SALT: $$cap_gen_random_hex(24)
|
|
DISABLE_REGISTRATION: 'true'
|
|
DISABLE_SUBSCRIPTION: 'true'
|
|
MAILER_EMAIL: $$cap_RELAY_USERNAME
|
|
SMTP_HOST_ADDR: srv-captain--$$cap_appname-mail
|
|
SMTP_HOST_PORT: '25'
|
|
|
|
caproverOneClickApp:
|
|
variables:
|
|
- defaultValue: 'admin@example.com'
|
|
description: This is the admin email. Please change it.
|
|
id: $$cap_ADMIN_USER_EMAIL
|
|
label: ADMIN_USER_EMAIL
|
|
validRegex: /^([^\s^\/])+$/
|
|
- defaultValue: 'admin'
|
|
description: This is the admin username. Please change it.
|
|
id: $$cap_ADMIN_USER_NAME
|
|
label: ADMIN_USER_NAME
|
|
validRegex: /^([^\s^\/])+$/
|
|
- defaultValue: 'password'
|
|
description: This is the admin password. Please change it.
|
|
id: $$cap_ADMIN_USER_PWD
|
|
label: ADMIN_USER_PWD
|
|
validRegex: /^([^\s^\/])+$/
|
|
- defaultValue: 'plausible'
|
|
description: This is the PostgreSQL password for user 'plausible'. Please change it.
|
|
id: $$cap_POSTGRES_PASSWORD
|
|
label: POSTGRES_PASSWORD
|
|
validRegex: /^([^\s^\/])+$/
|
|
- defaultValue: 'smtp.mailgun.org'
|
|
description: This is the SMTP host for sending email. Use Mailgun or whatever other service.
|
|
id: $$cap_RELAY_HOST
|
|
label: RELAY_HOST
|
|
validRegex: /^([^\s^\/])+$/
|
|
- defaultValue: '587'
|
|
description: This is the port for the SMTP host. Please change it if needed.
|
|
id: $$cap_RELAY_PORT
|
|
label: RELAY_PORT
|
|
validRegex: /^([^\s^\/])+$/
|
|
- description: This is the username for logging into the SMTP host. Please change it according to your host.
|
|
id: $$cap_RELAY_USERNAME
|
|
label: RELAY_USERNAME
|
|
- description: This is the password for logging into the SMTP host. Please change it according to your host.
|
|
id: $$cap_RELAY_PASSWORD
|
|
label: RELAY_PASSWORD
|
|
validRegex: /^([^\s^\/])+$/
|
|
- description: The version of Plausible docker image (from https://hub.docker.com/r/plausible/analytics/tags eg. v1 or v1.4)
|
|
id: $$cap_PLAUSIBLE_VERSION
|
|
label: PLAUSIBLE_VERSION
|
|
defaultValue: v1
|
|
validRegex: /^([^\s^\/])+$/
|
|
- description: Clickhouse version (from https://hub.docker.com/r/yandex/clickhouse-server/tags, eg 21.12.2.17)
|
|
id: $$cap_CLICKHOUSE_VERSION
|
|
label: CLICKHOUSE_VERSION
|
|
defaultValue: 21.3.2.5
|
|
validRegex: /^([^\s^\/])+$/
|
|
- description: Postgres version (from https://hub.docker.com/_/postgres?tab=tags, eg 12 or 12-alpine)
|
|
id: $$cap_POSTGRES_VERSION
|
|
label: POSTGRES_VERSION
|
|
defaultValue: 12-alpine
|
|
validRegex: /^([^\s^\/])+$/
|
|
instructions:
|
|
start: >-
|
|
Plausible is a lightweight and open-source website analytics tool.
|
|
It doesn't use cookies and is fully compliant with GDPR, CCPA and PECR. Made and hosted in the EU.
|
|
This one click app uses the:
|
|
- official image from https://hub.docker.com/r/plausible/analytics
|
|
- https://hub.docker.com/r/bytemark/smtp, that allows linked containers to send outgoing email
|
|
- official PostgreSQL image based on Alpine Linux and
|
|
- ClickHouse image https://hub.docker.com/r/yandex/clickhouse-server.
|
|
This version includes an open source geoip database (db-ip). If you would like to use Maxmind db,
|
|
You will need to mount a volume and an additional container to update the database. You can use this docker
|
|
compose file for reference: https://github.com/plausible/hosting/blob/master/geoip/docker-compose.geoip.yml
|
|
end: >-
|
|
Plausible.io is deployed and available as $$cap_appname.
|
|
In case you add a new domain to your application, remember to set the environment variable BASE_URL accordingly.
|
|
|
|
See https://github.com/plausible/analytics/blob/master/config/runtime.exs for all configurable
|
|
environment variables, for features like Google search, postmark, and slack integrations.
|
|
|
|
IMPORTANT: It will take up to 2 minutes for Plausible to be ready. Before that, you might see 502 error page.
|
|
displayName: Plausible
|
|
isOfficial: false
|
|
description: Plausible is a lightweight and open-source website analytics tool.
|
|
documentation: Taken from https://plausible.io/.
|