-
-
Notifications
You must be signed in to change notification settings - Fork 604
Theme development with Docker
First of all, thank you so much to D3473R for his awesome job on this! He make it possible! 🙌🏼
The following steps will guide you so that you can have a development environment on your machine without having to install Ghost:
-
Install Docker and docker-compose
-
Clone or download this repository
-
Open a terminal and go to the
src
directory -
Run
npm install
-
Run
npm run get-database
to get the Ghost database dump -
Start Docker
-
Run
npm run docker-watch
IMPORTANT: You probably will need to wait a little bit, even if a browser’s tab is opened, please keep waiting since the whole image and database will be created from scratch, probably it would take a few minutes, this will happen only the first time, the next time it should be faster.
If everything goes well you should see this page:
After you enter your own credentials you still need to activate the theme in the Ghost Admin: Settings —> Design —> Themes —> Advanced
You only need to do this once, the next time you run the command everything should be ready automatically.
Now you have an instant development setup and when you make changes you will see them right into the browser (hot-reloading).
You can see your blog here: http://localhost:3000
and you can access to the admin here: http://localhost:3000/ghost
.
As of version 2.0.1 of the theme you must provide your own credentials when accessing Ghost Admin for the first time, otherwise, if you are using an earlier version, you must enter the following credentials to gain access:
User: liebling@example.com
Password: 0123456789
When you're ready you can build the theme for production just by running npm run production
(within the src
directory).
This command will generate the file liebling.zip
in the root of the theme directory. Now you can upload this file to your own Ghost instance 😎.