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

Added config.production.json for easy installation to heroku (or any other). #433

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

bauripalash
Copy link

For newbie staticman users it was quite a hassle to setup staticman with heroku. It wouldn't work just out of the box. It took me about an hour to understand why this was not working.
This PR will help users to get started with Staticman + Heroku (or any other) pretty easily. Just setup your site and add environment variables to heroku app settings and Done! ❇️

@hispanic
Copy link

hispanic commented Sep 5, 2021

This caused me headaches when I started working with Staticman, too. I did exactly what you did. However, I came to realize that the config.production.json file is not needed when running in Heroku, especially for the purpose of simply pointing at the environmental variables. The convict documentation speaks to this. In Heroku, I have multiple Staticman apps, one each for dev, staging, and production. I do not source/provide a config.[env].json file for any of them.

I do, however, maintain a config.development.json file for local development (because I find it easier to maintain/adjust those settings locally via a file instead of via environmental variables). But, I do not source it.

@jamesmortensen
Copy link

Hi @hispanic when I see the convict documentation, my understanding is that any environment variables set in Heroku would override anything in config.production.json. If my understanding is correct, then I think that means I should not need a config.production.json to get this working on Heroku.

In @bauripalash pull request, I see there's a config.production.json. Can you please help me understand whether the json file is needed or not for Heroku deployment? Thank you.

@hispanic
Copy link

@jamesmortensen Correct, a config.production.json file should not be needed in Heroku. Of course, this assumes that you have set the environment variables either via the GUI or command line.

@jamesmortensen
Copy link

Thanks for the reply. I did get it working, but I still need to style the form and the comment view. It seems another thing we could use are some standard Staticman CSS templates to make it easier to get started.

Thanks for all your work on this. It should be the future for how content is delivered to users.

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

Successfully merging this pull request may close these issues.

3 participants