New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When in Development Mode: Saved Changes to Ghost Theme Do Not Appear on Refresh #56

Closed
necevil opened this Issue Dec 28, 2016 · 1 comment

Comments

Projects
None yet
1 participant
@necevil
Copy link

necevil commented Dec 28, 2016

I am currently running the official 0.11.3 ghost image on my local OSx machine.

I am running only the official ghost image with no proxies etc and mapping my theme folder and config file into the container using volumes. Everything works, but Ghost acts like it's in production mode even though it says it is in development mode on startup.

I am passing NODE_ENV = development as an environmental variable and using a Ghost config.js file that DOES NOT have a production server / host block (ie. it would error out if NODE_ENV was anything other than "development")

I am able to access the blog / theme and everything runs properly in my browser EXCEPT when I make a change to my Theme files. That change is then not reflected when I refresh my browser.

Further, if I restart my Ghost container, the change is still not visible even after waiting for the container to restart and again reloading the page. In order to see the changes visible I have to kill the current container and spin up a new one.

On start up Ghost indicates:
+++++
npm info using npm@2.15.11
npm info using node@v4.7.0
npm info prestart ghost@0.11.3
npm info start ghost@0.11.3

ghost@0.11.3 start /usr/src/ghost
node index

Starting Ghost using DEVELOPMENT config... :) #added echo in my config file
NODE_ENV = development... :) #added echo in my config file
+++++

and then finally....
"Ghost is running in development... "
+++++

At some point I had all of this working in the distant past.

Steps taken to trouble shoot thus Far

#1. Add a line to config file to echo the current NODE_ENV value,
Result: Echos NODE_ENV = development on startup
#2. Docker Exec -it into Ghost container to check to make sure the edited files are in fact flowing through into the container by editing them from within the container using vim.
Result: Changed files are up to date inside of the container.
#3. Docker Exec -it into Ghost container to kill node process / attempt to restart
**Result: Container dies / exits with:
Ghost was running for 8 minutes
npm info poststart ghost@0.11.3
npm info ok
#4. Pull down Ghost:0.11 image to use instead of 0.11.3
Result: No Change, same issue.

I am not using VirtualBox so some of the issues related to volumes and sendfile are probably not relevant.

I am on MacOS using Docker for Mac 1.12.3, with the latest version of the ghost image from docker hub. I am using a remote mysql db and my fingers are bleeding from two days of googling around for trouble shooting ideas, hopefully you guys have some.

@necevil

This comment has been minimized.

Copy link

necevil commented Dec 28, 2016

Ok this ended up being an issue related to my use of the /usr/src/ghost/ directory in my volume instead of the /var/lib/ghost directory. I swapped these two and everything is working as intended.

@necevil necevil closed this Dec 28, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment