docker-library / ghost

Docker Official Image packaging for Ghost
https://hub.docker.com/_/ghost
MIT License
720 stars 311 forks source link

Sign in and subscription buttons do not function #389

Closed tigerkzr closed 1 year ago

tigerkzr commented 1 year ago

I spun up a Ghost instance with :latest but the "sign in" and "subscribe" buttons are not functional. Clicking them has no effect. The search button does bring up the search bar and the "home" "about" and article links work.

Environment:

Ubuntu Server 23.04
Docker 24.0.5
image ghost:latest
traefik reverse proxy
mariadb mysql server

Of note: On first visit from a browser (ie clean cache) I receive this error:

Unknown Request error.

"http://ghost.example.net/favicon.ico"

Error ID:
    b8780970-481d-11ee-afa0-29cbb07008eb

Error Code:
    IMAGE_SIZE_URL

----------------------------------------

Error: connect ECONNREFUSED 10.0.10.31:80
    at /var/lib/ghost/versions/5.60.0/core/server/lib/image/ImageSize.js:192:39
    at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1278:16)

here are the configuration setting I have setup with env vars:

    environment:
      # see https://ghost.org/docs/config/#configuration-options
      # this url value is just an example, and is likely wrong for your environment!
      url: http://ghost.example.net
      # server__host: 0.0.0.0
      # server__port: 2368
      ## database
      database__client: mysql
      database__connection__host: $MARIADB_HOST
      database__connection__user: ghost
      database__connection__password: ghost
      database__connection__database: ghost
      # contrary to the default mentioned in the linked documentation, this image defaults to NODE_ENV=production (so development mode needs to be explicitly specified if desired)
      # NODE_ENV: development
      ## bulk mailer
      mail__transport: smtp
      mail__options__service: mailgun
      mail__options__host: $MAILGUN_SMTP_SERVER
      mail__options__port: $MAILGUN_SMTP_PORT
      mail__options__secure: true
      mail__options__auth__user: $MAILGUN_USER
      mail__options__auth__pass: $MAILGUN_PASSWD
      ## logging
      logging__path: "/logs"
      logging__useLocalTime: true
      logging__level: "info"
      logging__rotation__enabled: true
      logging__rotation__count: 15
      logging__rotation__period: "1d"
      ## image upload
      # imageOptimization_resize: false       #<true>
      ## adapters
      # adapters__storage__active: storage-module-name
      # adapters__storage__storage-module-name__key: value

I am at a loss to where else to look to troubleshoot this, any help or advice is appreciated.

Logxn commented 1 year ago

I have had this issue before. Your URL http://ghost.example.net needs to point to your custom url. Also consider replacing http with https if you use SSL like Lets Encrypt

XChikuX commented 1 year ago

I am facing the exact same issue. You are running 5.60 with the latest tag. And not with the alpine, yes?

tigerkzr commented 1 year ago

URL IS pointing at my custom. I edited the above for anonymity. Using http because traefik is handling the SSL including redirect to https and my backend is all in the clear.

I am NOT using the alpine image. Just ghost:latest.

XChikuX commented 1 year ago

I was able to fix it for myself. I am operating my website from multiple domains.

I had a block rule on my firewall for /blog/api on the main domain I'm hosting ghost.

@tigerkzr Check if the same thing is being blocked for you.

My fix was just to allow this endpoint in my WAF.

tigerkzr commented 1 year ago

So LOL. I changed my custom url to https even tough ghost isn't handling the ssl and it works. Thanks for the advice everyone.

XChikuX commented 1 year ago

To any ghost devs who've scrolled this far. You can safely close this issue. Your product is the "💣" :)