question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Docker Ghost redirect to localhost:2368

See original GitHub issue

I can’t use ghost with docker on domain name or ip != localhost

Everything work, but the home link redirect to localhost:2368 and email invation too.

docker run -d --name some-ghost -p 3001:2368 -v /path/to/ghost/blog:/var/lib/ghost/content ghost:1.8.1-alpine

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:12 (1 by maintainers)

github_iconTop GitHub Comments

40reactions
acburdinecommented, Sep 2, 2017

@MLescaudron this is not an issue with Ghost itself - this has to do with the ghost docker image (which is over at this repo).

However, this is actually solvable, as you can provide environment variables to the ghost instance in order to configure it, see the docs. In your specific case, to run ghost’s docker with a different url you would use:

docker run -d --name ghost -p 3001:2368 -e url=http://my-ghost-url.com -v /path/to/ghost/blog:/var/lib/ghost/content ghost:1.8.1-alpine

Closing because this is neither a bug nor an issue related to Ghost itself.

18reactions
nendonerdcommented, Dec 22, 2018

setting docker-compose environment as url=<your site> works, but mind that it’s CASE-SENSITIVE, only ‘url’ works but not ‘URL’

services:
    ghost:
        environment:
            - url=https://xxx.xxx
Read more comments on GitHub >

github_iconTop Results From Across the Web

Removing https://localhost:2368 from RSS Feed and Latest Post
“Latest Post”-, “RSS FEED”- and “HOME”-Link (Footer) are redirecting to https://localhost:2368 - i want them to redirect to my site.
Read more >
Ghost home icon redirects to http://localhost:2368?
I recently migrated my Ghost install from one droplet to another. I exported content, copied the files out of the old droplet and...
Read more >
Simple Way to Use Ghost via Docker - Ron.sh
Export all contents from your Ghost admin page (including redirects and routes). Make sure to rename routes.yml to routes.yaml before importing ...
Read more >
Docker, unable to run Ghost on default port 2368
The fix, which took me a while to get to: docker run -d --name some-ghost2 -v -p 2368:2368 some-ghost-data:/var/lib/ghost/content ghost.
Read more >
Set up a personal blog with Ghost and Docker - Teco Tutorials
We map the port 2368 exposed by the Ghost image to 8080 so, by calling localhost:8080, we can reach localhost:2368 inside the container....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found