# Joplin Server - Note sync backend
# Port: 22300
# Sync server for Joplin notes app
version: '3'

services:
  db:
    image: postgres:15
    volumes:
      - /volume2/metadata/docker/joplin:/var/lib/postgresql/data
    ports:
      - "5435:5432"
    restart: unless-stopped
    environment:
      - POSTGRES_PASSWORD="REDACTED_PASSWORD"  # pragma: allowlist secret
      - POSTGRES_USER=joplin
      - POSTGRES_DB=joplin
  app:
    image: joplin/server:latest
    depends_on:
      - db
    ports:
      - "22300:22300"
    restart: unless-stopped
    environment:
      - APP_PORT=22300
      - APP_BASE_URL=https://joplin.thevish.io
      - DB_CLIENT=pg
      - POSTGRES_PASSWORD="REDACTED_PASSWORD"  # pragma: allowlist secret
      - POSTGRES_DATABASE=joplin
      - POSTGRES_USER=joplin
      - POSTGRES_PORT=5432
      - POSTGRES_HOST=db
      - MAILER_ENABLED=1
      - MAILER_HOST=smtp.gmail.com
      - MAILER_PORT=587
      - MAILER_SECURITY=starttls
      - MAILER_AUTH_USER=your-email@example.com
      - MAILER_AUTH_PASSWORD="REDACTED_PASSWORD"  # pragma: allowlist secret
      - MAILER_NOREPLY_NAME=JoplinServer
      - MAILER_NOREPLY_EMAIL=your-email@example.com
