flosoft / docker-joplin-server

Joplin Server docker image
66 stars 7 forks source link

EmailService: Service will be disabled because mailer config is not set or is explicitly disabled #21

Open PN62323424 opened 2 years ago

PN62323424 commented 2 years ago

I can't start joplin successfully, here is my error report and docker configuration, can you help me?

thank u very much!

stdout: 2022-06-23 01:17:29: App: Content driver: { type: 1 } stdout: 2022-06-23 01:17:29: App: Content driver (fallback): null stdout: 2022-06-23 01:17:29: App: Trying to connect to database... stdout: 2022-06-23 01:17:30: App: Connection check: { stdout: latestMigration: { name: '20220201151223_backup_items.js', done: true }, stdout: isCreated: true, stdout: error: null stdout: } stdout: 2022-06-23 01:17:31: App: Auto-migrating database... stdout: 2022-06-23 01:17:31: App: Latest migration: { name: '20220201151223_backup_items.js', done: true } stdout: 2022-06-23 01:17:31: App: Performing main storage check... stdout: 2022-06-23 01:17:31: App: Database storage is special and cannot be checked this way. If the connection to the database was successful then the storage driver should work too. stdout: 2022-06-23 01:17:31: App: Starting services... stdout: 2022-06-23 01:17:31: ShareService: Starting maintenance... stdout: 2022-06-23 01:17:31: EmailService: Service will be disabled because mailer config is not set or is explicitly disabled stdout: 2022-06-23 01:17:31: TaskService: Scheduling #1 (Delete expired tokens): 0 /6 stdout: 2022-06-23 01:17:31: TaskService: Scheduling #2 (Update total sizes): 0 stdout: 2022-06-23 01:17:31: TaskService: Scheduling #3 (Process oversized accounts): 30 /2 stdout: 2022-06-23 01:17:31: TaskService: Scheduling #7 (Compress old changes): 0 0 /2 stdout: 2022-06-23 01:17:31: TaskService: Scheduling #8 (Process user deletions): 0 /6 * stdout: 2022-06-23 01:17:31: App: Call this for testing: curl http:/10.0.0.75/api/ping stdout: 2022-06-23 01:17:31: ShareService: Maintenance completed in 24ms

The docker installation command I used: docker run -d \ --name joplin \ -e APP_BASE_URL=http://xxx.xxx.xxx:22300 \ -e APP_PORT=22300 \ -e POSTGRES_PASSWORD=xxxxxxx \ -e POSTGRES_DATABASE=joplin \ -e POSTGRES_USER=postgres \ -e POSTGRES_PORT=5432 \ -e POSTGRES_HOST=192.168.200.10 \ -e DB_CLIENT=pg \ -e MAX_TIME_DRIFT=0 \ --restart unless-stopped \ florider89/joplin-server:latest

Tymose commented 1 year ago

For MAILER I'm using docker compose and env file. This are linse from my configuration to have mail server enabled and I assume that if you dont want to use docker compose than you can use -e parameter as you are showing above before every command. Mail section is startign from MAILER parameter. I dont think mailer is issue in your case though as I was able to start server succesfully without it.

Part of docker-compose.yaml file:

  joplin:
    image: xxxxxxxx/joplin-server
    container_name: joplin
    restart: unless-stopped
    ports:
      - 22300:22300
    env_file:
      - ./.env
    networks:
      - dockers-network

And additionally .env file:

APP_PORT: 22300
APP_BASE_URL: http://xxx.xxx.xxx:22300/
DB_CLIENT=pg
POSTGRES_PASSWORD=xxxxxxxxxx
POSTGRES_DATABASE=joplin
POSTGRES_USER=postgres
POSTGRES_PORT=5432
POSTGRES_HOST=postgres
MAILER_ENABLED=1
MAILER_HOST=smtp.gmail.com
MAILER_PORT=587
MAILER_SECURITY=starttls
MAILER_AUTH_USER=xxxxxxxx@gmail.com
MAILER_AUTH_PASSWORD=xxxxxxxxxx
MAILER_NOREPLY_NAME=JoplinServer
MAILER_NOREPLY_EMAIL=xxxxxxxxx@gmail.com
Weuxel commented 10 months ago

Thanks, that should be mentioned in the example docker compose file. It is pretty much useless without it.