plausible / community-edition

Example Docker Compose setup for hosting Plausible Community Edition
1.45k stars 303 forks source link

Mailer/SMTP Setup #76

Closed art-n closed 1 year ago

art-n commented 1 year ago

Hi there,

I'm trying to setup emails notifications on my Plausible self-hosted.

docker-compose.yml

version: "3.3"
services:
  mail:
    image: bytemark/smtp
    restart: always

  plausible_db:
    image: postgres:12
    restart: always
    volumes:
      - db-data:/var/lib/postgresql/data
    environment:
      - POSTGRES_PASSWORD=**********

  plausible_events_db:
    image: yandex/clickhouse-server:21.3.2.5
    restart: always
    volumes:
      - event-data:/var/lib/clickhouse
      - ./clickhouse/clickhouse-config.xml:/etc/clickhouse-server/config.d/logging.xml:ro
      - ./clickhouse/clickhouse-user-config.xml:/etc/clickhouse-server/users.d/logging.xml:ro
    ulimits:
      nofile:
        soft: 262144
        hard: 262144

  plausible:
    image: plausible/analytics:latest
    restart: always
    command: sh -c "sleep 10 && /entrypoint.sh db createdb && /entrypoint.sh db migrate && /entrypoint.sh db init-admin && /entrypoint.sh run"
    depends_on:
      - plausible_db
      - plausible_events_db
      - mail
    ports:
      - 8000:8000
    env_file:
      - plausible-conf.env

plausible-conf.env

ADMIN_USER_EMAIL=**********
ADMIN_USER_NAME=**********
ADMIN_USER_PWD=**********
BASE_URL=**********
SECRET_KEY_BASE=**********
DISABLE_REGISTRATION=true
GOOGLE_CLIENT_ID=**********
GOOGLE_CLIENT_SECRET=**********
MAILER_EMAIL=example@example.com
SMTP_HOST_ADDR=in-v3.mailjet.com
SMTP_USER_NAME=API_KEY
SMTP_USER_PWD=API_SECRET_KEY
SMTP_HOST_SSL_ENABLED=false
SMTP_RETRIES=2

Thank you !

ruslandoga commented 1 year ago

πŸ‘‹ @art-n

And what problems are you having?

art-n commented 1 year ago

πŸ‘‹ @art-n

And what problems are you having?

Halo @ruslandoga

E-mails are not sending. But if I think it's because of bytemark opening ports or CRON maybe.

I've finally moved my installation through Coolify and everything's good.

ruslandoga commented 1 year ago

I finally moved my installation through Coolify and everything's good.

I'm glad you got it working :)

Does it mean we can close this issue?