Closed ipari closed 10 months ago
Can you share your docker compose file? I ran the docker-compose from the readme and didn't get any errors.
@LaurentGoderre Thanks for your reply. Here is my docker-compose.yml
version: '3'
services:
blog:
image: ghost:5
restart: always
ports:
- 5004:2368
environment:
database__client: ${GHOST_DB_CLIENT}
database__connection__host: ${GHOST_DB_HOST}
database__connection__user: ${MYSQL_USER}
database__connection__password: ${MYSQL_PASSWORD}
database__connection__database: ${MYSQL_DATABASE}
url: ${GHOST_URL}
volumes:
- .content:/var/lib/ghost/content
db:
image: mysql:8
restart: always
ports:
- 5005:3306
environment:
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
MYSQL_USER: ${MYSQL_USER}
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
MYSQL_DATABASE: ${MYSQL_DATABASE}
volumes:
- .db:/var/lib/mysql
Do you have a themes
folder in your host content folder?
There is nothing in content folder
Btw, these lines:
database__client: ${GHOST_DB_CLIENT}
database__connection__host: ${GHOST_DB_HOST}
Should be:
database__client: mysql
database__connection__host: db
The issue is that when the content
folder doesn't have themes, it tries to copy some of the base content and symlink from the current
theme.
If you want to volume mount but have nothing to start with you can run this before you start your compose
docker cp $(docker create --name temp-copy ghost:5)://var/lib/ghost/current/content/. .content/ && docker rm temp-copy
OMG it finally works! Thank you 🤩🤩
The ghost container's status remains "Restarting" after
docker-compose up -d
When I checked the log, I saw the following:How can I solve this?