Skip to content
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

Starting Ghost 1.0 fails with no error #384

Closed
1 of 2 tasks
alexellis opened this issue Jul 27, 2017 · 14 comments
Closed
1 of 2 tasks

Starting Ghost 1.0 fails with no error #384

alexellis opened this issue Jul 27, 2017 · 14 comments

Comments

@alexellis
Copy link

Welcome to Ghost-CLI's GitHub repo! 👋🎉

Do you need help or have a question? Please come chat in Slack: https://slack.ghost.org/ 👫.

This issue is a

  • Bug Report
  • Feature Request

Summary

If this is a bug, double-check and make sure there's not already an existing issue for it, then provide a quick summary of what error is occurring.

If this is a feature request, use this section to describe what feature you would like to see in the CLI, as well as a quick summary of any benefits or drawbacks you can think of if this feature is implemented.

Steps to Reproduce (for a bug report)

Building and running Ghost 0.11.x works fine on Docker, but 1.0 says Starting Ghost then fails silently with no error. Please advise.

FROM node:6.11.1-alpine

ENV NPM_CONFIG_LOGLEVEL warn

USER root
WORKDIR /root/

WORKDIR /var/www/
RUN npm install -g ghost-cli

RUN addgroup www-data
RUN adduser ghost -G www-data -S /bin/bash
RUN chown ghost:www-data .

USER ghost
WORKDIR /var/www/
RUN mkdir -p ghost
WORKDIR /var/www/ghost

RUN ghost install local --no-start

EXPOSE 2368
EXPOSE 2369

ENV NODE_ENV production

CMD ["ghost", "start"]

Technical details (will be automatically output by Ghost-CLI if an error occurs):

Ghost 1.0 - Node 0.6.11 - Alpine Linux

sudo docker rm ghost ; sudo docker run -e DEBUG=ghost:* -p 2368:2368 --name ghost -ti alexellis2/ghost:1.0 ghost start --debug --process=local
ghost
✔ Validating config
✔ Starting Ghost
You can access your blog at http://localhost:2368/

Ghost uses direct mail by default
To set up an alternative email method read our docs at https://docs.ghost.org/docs/mail-config
@acburdine
Copy link
Member

Right, so if you're using Docker ghost start is not the right command to use.

With a local install ghost start will start up the Ghost subprocess, then exit and leave it running in the background.

Try changing the command to CMD ["ghost", "run", "--development"] -> it should work then.

@acburdine
Copy link
Member

Going to close this as it's not an actual bug with Ghost-CLI itself, rather an issue with how it's used in docker.

@alexellis
Copy link
Author

I can't see a way to open up the IP to 0.0.0.0? even passing --ip 0.0.0.0 doesn't seem to work. Can you point me at the right docs? I'm looking but can't see it.

@ErisDS
Copy link
Member

ErisDS commented Jul 27, 2017

Wait wait - where is everyone getting the idea to use ghost install local for docker?!

We keep seeing this crop up and it's horribly wrong. I'd like to make sure we point people in the right direction. I've asked this a few times now.

No one should be using ghost install local and definitely not ghost run --development for a production install.

They should be using ghost install --process=local SURELY?

@acburdine
Copy link
Member

acburdine commented Jul 27, 2017

@ErisDS That is also true, my mistake for not catching that

I can come up with a recommended Dockerfile here in a few if that would help.

@ErisDS
Copy link
Member

ErisDS commented Jul 27, 2017

I think it would be a good idea yeah... although it's not part of the official stack, the official stack can be used with Docker, and I'd rather cover this with a correct example in the docs than keep seeing this same thing pop up.

@alexellis I think it was you on Slack who I asked before - where did the idea to use ghost install local come from? I've seen it so many times now that I'm assuming there's a blog post somewhere.

@acburdine
Copy link
Member

So as it stands, ghost install local is the only way to get it running in Docker right now - there's a bug I discovered in that there's no way to disable setting up the ghost linux user without the --local option.

HOWEVER ghost install local is still not recommended for docker - I will open an additional issue for the bug I found.

@alexellis
Copy link
Author

alexellis commented Jul 27, 2017

ghost install local failed to work in Docker. I'm really not sure why you guys didn't publish instructions for Docker or if you did - I couldn't find them?

I can update this blog if you can help craft a neater Dockerfile

https://blog.alexellis.io/try-ghost-1-0-in-docker/

https://github.com/alexellis/ghost-on-docker

@alexellis
Copy link
Author

alexellis commented Jul 27, 2017

This was the error - I didn't find a way to pass a force flag through. @ErisDS

/var/www/ghost3 $ ghost install --process=local
✔ Checking system Node.js version
✔ Checking current folder permissions
System checks failed with message: 'Linux version is not Ubuntu 16'
Some features of Ghost-CLI may not work without additional configuration.
For local installs we recommend using `ghost install local` instead.
? Continue anyway? (y/N) 
/var/www/ghost3 $ ghost install --process=local --no-prompt
✔ Checking system Node.js version
✔ Checking current folder permissions
System checks failed with message: 'Linux version is not Ubuntu 16'
Some features of Ghost-CLI may not work without additional configuration.
For local installs we recommend using `ghost install local` instead.
✖ Checking operating system
A SystemError occured.

Message: Prompts have been disabled, please provide options via command line flags

Debug Information:
    Node Version: v6.11.1
    Ghost-CLI Version: 1.0.0
    Environment: production
    Command: 'ghost install --process=local --no-prompt'

@alexellis
Copy link
Author

Do you know why I get Starting Ghost despite passing --no-start ?

@ErisDS
Copy link
Member

ErisDS commented Jul 27, 2017

I'm really not sure why you guys didn't publish instructions for Docker

I was really hoping to avoid having to deal it with "officially" as my personal feelings toward it are less than positive. The aim behind ghost-cli as well as making it easier for people to install Ghost, is to introduce a recommended stack to reduce the team's support overhead and get people to either use our recommended stack, or self-solve.

However, I don't see us getting away from docker, so I think having a recommended approach will help keep support overhead down.

@alexellis For now I think you're going to need to hold off trying to install with Docker until a couple of ghost-cli bugs are fixed. We will get there but this is never going to be our number 1 use case.

@jwarkentin
Copy link

Some sort of support for docker would be good. It's just not feasible or desirable to switch all tooling and infrastructure away from using docker and try to manage things with the new CLI tool.

@acburdine
Copy link
Member

@jwarkentin We're not asking that everyone do that 😄 The recommended system stack is simply saying what the Ghost Core Team will provide support for. That being said, based on the fact that Docker is very widely used in the community, I am working on a Ghost 1.0 docker image over at https://github.com/docker-library/ghost

@jwarkentin
Copy link

Perfect! I will keep an eye out for the update over there. I was just a little worried that those of us using Docker might get left behind. Thanks for your work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants