Skip to content

it can't run in production mode #160

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

Closed
LomotHo opened this issue Oct 23, 2018 · 5 comments
Closed

it can't run in production mode #160

LomotHo opened this issue Oct 23, 2018 · 5 comments
Labels

Comments

@LomotHo
Copy link

LomotHo commented Oct 23, 2018

when I set "--env NODE_ENV=production", the container will crash
I use the ghost:0.11-alpine version
and here is the log

> ghost@0.11.13 start /usr/src/ghost
> node index
ERROR: Unable to access Ghost's content path:
  EACCES: permission denied, open '/usr/src/ghost/content/apps/9d472f697f497e44'
@LomotHo
Copy link
Author

LomotHo commented Oct 23, 2018

now I have solved the problem, just add this to the config.js in the production part,

    production: {
        url: 'http://www.xxxxxxx.com',
        mail: {},
        database: {
            client: 'sqlite3',
            connection: {
                filename: path.join(process.env.GHOST_CONTENT, '/data/ghost.db')
            },
            debug: false
        },
        server: {
            host: '0.0.0.0',
            port: '2368'
        },

    // ===========add this as follow===========
        paths: {
            contentPath: path.join(process.env.GHOST_CONTENT, '/')
        }
    // ===========add this===========
    }

@wglambert
Copy link

Similar #15 #2

It looks like prior to version 1.0 the Ghost env variables weren't supported #124 #73 (comment)
The documentation doesn't specify a version requirement https://docs.ghost.org/concepts/config/#section-running-ghost-with-config-env-variables

From this comment specifically it seems when using version 0.x you need to configure it using a custom json config

@tianon
Copy link
Member

tianon commented Oct 25, 2018

Indeed -- I'd really recommend upgrading to Ghost 1.x ASAP, but if you can't, you'll have to deal with JSON files for configuration, unfortunately.

@tianon tianon closed this as completed Oct 25, 2018
@tianon
Copy link
Member

tianon commented Oct 25, 2018

@acburdine do you anticipate that there will be any more Ghost 0.x releases? Should we remove it from the supported images? What about 1.x? Is the table at https://docs.ghost.org/faq/upgrade-to-ghost-1-0/#why-upgrade-to-1-0 accurate? There don't seem to have been any releases of either 1.x or 0.x since 2.0.0. 😅

@LomotHo
Copy link
Author

LomotHo commented Oct 26, 2018

0.x is ok for me. in fact I don't like the default theme of both 1.x and 2.0. Json config file won't cost so much time...I use systemd to mange the ghost blog before,
while docker even cost more time to deploy 0.x.

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

No branches or pull requests

3 participants