hackmdio / codimd

CodiMD - Realtime collaborative markdown notes on all platforms.
https://hackmd.io/c/codimd-documentation
GNU Affero General Public License v3.0
9.3k stars 1.06k forks source link

Picture upload to minio error occurred after update to 1.4.0 #1354

Closed niton555 closed 4 years ago

niton555 commented 4 years ago

I use docker to deploy minio and codimd. In version 1.3.1 it was possible to upload without problems, but in 1.4.0 an error occurs. Do I need to change any settings?

version: '3.5'
services:
  codimd:
    image: nabo.codimd.dev/hackmdio/hackmd:1.4.0
    restart: on-failure
    ports: 
      - 3020:3000
    environment:
      - CMD_DB_URL=postgres://codimd:codimd@codimdpostgres:5432/codimd
      - CMD_DOMAIN=codimd.myDomain
      - CMD_PLANTUML_SERVER=https://www.plantuml.com/plantuml
      - CMD_IMAGE_UPLOAD_TYPE=minio
      - CMD_MINIO_ACCESS_KEY=mySecret
      - CMD_MINIO_SECRET_KEY=mySecret
      - CMD_MINIO_ENDPOINT=minio.myDomain
      - CMD_MINIO_PORT=443
      - CMD_MINIO_SECURE=true
      - CMD_S3_BUCKET=hackmd
      - CMD_SESSION_SECRET=mySecret
      - CMD_ALLOW_ANONYMOUS=false
      - CMD_ALLOW_ANONYMOUS_EDITS=false
      - CMD_ALLOW_EMAIL_REGISTER=false
      - CMD_DEFAULT_PERMISSION=limited
      - CMD_PORT=3000
      - CMD_PROTOCOL_USESSL=true
      - CMD_URL_ADDPORT=false
    volumes:
      - /mnt/data/data_disk/codimd:/home/hackmd/app/public/uploads
    extra_hosts:
      - "minio.mydomain:myLocalIP"
    depends_on:
      - codimddb
      - minio
      - codimdpostgres
    links:
      - codimddb
      - minio
      - codimdpostgres

  codimdpostgres:
    image: postgres:11.5
    environment:
      - POSTGRES_USER=codimd
      - POSTGRES_PASSWORD=codimd
      - POSTGRES_DB=codimd
    volumes:
      - /mnt/data/data_disk/codimdpostgres:/var/lib/postgresql/data
    restart: on-failure

  minio:
    image: "minio/minio"
    restart: on-failure
    ports:
      - "9010:9000"
    volumes:
      - /mnt/data/data_disk/minio:/data
    command: server /data
    environment:
      - MINIO_ACCESS_KEY=mySecret
      - MINIO_SECRET_KEY=mySecret

error log

codimd_1              | 2019-11-23T13:33:03.503Z error:         uncaughtException: "secure" option deprecated, "useSSL" should be used instead
codimd_1              | Error: "secure" option deprecated, "useSSL" should be used instead
codimd_1              |     at new Client (/home/hackmd/app/node_modules/minio/dist/main/minio.js:82:53)
codimd_1              |     at Object.<anonymous> (/home/hackmd/app/lib/web/imageRouter/minio.js:10:21)
codimd_1              |     at Module._compile (module.js:653:30)
codimd_1              |     at Object.Module._extensions..js (module.js:664:10)
codimd_1              |     at Module.load (module.js:566:32)
codimd_1              |     at tryModuleLoad (module.js:506:12)
codimd_1              |     at Function.Module._load (module.js:498:3)
codimd_1              |     at Module.require (module.js:597:17)
codimd_1              |     at require (internal/module.js:11:18)
codimd_1              |     at /home/hackmd/app/lib/web/imageRouter/index.js:30:30
codimd_1              |     at IncomingForm.<anonymous> (/home/hackmd/app/node_modules/formidable/lib/incoming_form.js:107:9)
codimd_1              |     at emitNone (events.js:106:13)
codimd_1              |     at IncomingForm.emit (events.js:208:7)
codimd_1              |     at IncomingForm._maybeEnd (/home/hackmd/app/node_modules/formidable/lib/incoming_form.js:557:8)
codimd_1              |     at /home/hackmd/app/node_modules/formidable/lib/incoming_form.js:238:12
codimd_1              |     at WriteStream.<anonymous> (/home/hackmd/app/node_modules/formidable/lib/file.js:79:5)
codimd_1              |     at Object.onceWrapper (events.js:313:30)
codimd_1              |     at emitNone (events.js:111:20)
codimd_1              |     at WriteStream.emit (events.js:208:7)
codimd_1              |     at finishMaybe (_stream_writable.js:613:14)
codimd_1              |     at afterWrite (_stream_writable.js:464:3)
codimd_1              |     at onwrite (_stream_writable.js:454:7)
codimd_1              | 2019-11-23T13:33:03.511Z error:         An uncaught exception has occured.
codimd_1              | 2019-11-23T13:33:03.511Z error:         "secure" option deprecated, "useSSL" should be used instead
codimd_1              | 2019-11-23T13:33:03.512Z error:         Process will exit now.
amasson84 commented 4 years ago

I have exactly the same problem after the update I cannot upload to minio and I get the same error message when I try