URL not updating

I have installed ghost via Docker, I have set a url and can see it update in the config file. But when a restart the server and goto my site the URL is still as the public IP of the server, this is what I dont want. Thanks for the help!

Are you using Docker-compose? if so share your docker-compose.yaml file

I setup ghost running this command
docker run -d --name ghost -e url=http://localhost:3001 -p 3001:2368 ghost

got the issue … its actually not saving any data so when you restart the container all went fresh.
Its better to use docker with Docker Compose
I can provide you a docker-compose file to use for ghost deployment which i use for my own instances

allow me some time i will get back to you with the docker compose file

Thank you so much for the help

You are welcome…

Okay you need to install docker-compose first

sudo apt install docker-compose

now create a folder to contain the docker-compose file for eg myblog

mkdir myblog

now create a file called docker-compose.yaml inside the folder we created in my case its myblog

nano myblog/docker-compose.yaml

& paste the following to the docker-compose.yaml file

version: '3'


    container_name: containername
    image: ghost:latest
    restart: always
      - 3001:2368
      - ./content:/var/lib/ghost/content
      url: https://yourdomain.com
      database__client: mysql
      database__connection__host: db
      database__connection__user: root
      database__connection__password: password
      database__connection__database: databasename

    container_name: dbcontainer_db
    image: mysql:5.7
    restart: always
      MYSQL_ROOT_PASSWORD: password
      - ./data:/var/lib/mysql

save the file & dont forget the adjust the values such as containername, url, db container name password etc.

Note: database__connection__password: & MYSQL_ROOT_PASSWORD: has to be same…

now just run the container by following command

docker-compose up -d

with this method you wont loose any data after restarting the container

Hope this helps >