Closed marnixhoh closed 2 years ago
workaround
docker-compose.yml
version: '3.1'
services:
ghost:
image: ghost:latest
restart: always
ports:
- 127.0.0.1:2368:2368
environment:
NODE_ENV: development
database__client: mysql
database__connection__host: db
database__connection__user: root
database__connection__password: password
database__connection__database: ghost_dev
volumes:
- ./..:/var/lib/ghost/content/themes/liebling
db:
image: mysql:8
environment:
MYSQL_ROOT_PASSWORD: password
volumes:
- ~/ghost_dev_data/mysql:/var/lib/mysql
# β anywhere except the project directory
@shincurry Thank you for the suggestion. :)
Your workaround suggests to use MySQL. However, the local development instructions say to download the ghost.db
database file, which is a sqlite
file. Ideally, I'd like to use this db file.
I appreciate your response, but I hope that the maintainers or someone else can help me get the ghost.db
file to work.
Thanks again
This has been fixed in the latest version, I also updated the documentation to reflect the implemented changes.
I recommend you to remove the current container from the Docker dashboard so the next time you run docker-watch
it starts fresh.
@eddiesigner Awesome! Thank you so much for fixing this. I will give it a try later
Hi @marnixhoh and @eddiesigner , I have tried it with the new update but it still doesn't seem to be using the ghost.db sqlite file
Hi @Onihani,
Looks like ghost is actually creating and using a sqlite database located at /var/lib/ghost/current/content/data/ghost-dev.db
To use your local ghost.db
, which is mounted into the Docker container, specify it in docker-compose.yml
version: '3'
services:
ghost:
image: ghost:5.14.1
container_name: ghost
volumes:
- ./..:/var/lib/ghost/content/themes/liebling:Z
- ./ghost.db:/var/lib/ghost/content/data/ghost.db:Z
environment:
NODE_ENV: development
database__client: sqlite3
database__connection__filename: content/data/ghost.db
ports:
- 2368:2368
Read more about database configuration.
@dschwertfeger thanks a lot it works now. This was really helpful. Thanks again ππΎππΎ
@Onihani I haven't tried the new update yet and I only just had time to look at your question, but I see that you've found a solution. Awesome! :)
Hi,
I followed the instructions here: https://github.com/eddiesigner/liebling/wiki/Theme-development-with-Docker
But I get the following error:
Any help would be greatly appreciated. Also, please let me know if there is any more information I can provide :)
Thank you so much!