-
Notifications
You must be signed in to change notification settings - Fork 549
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
Unable to host own instance #318
Comments
Have made some progress in this regard. Cross posting from another thread: For now, I have been able to get this working on a test instance. For the best results, I would recommend hosting your own instance of my patched dev branch. I would recommend only using personal access token authentication with GitHub as well as /v2/ of the Staticman endpoints and not /v3/ for now, as I haven't gotten to testing the rest yet. You can quite easily host your instance in Heroku. The abridged version is:
Best of luck. Let me know if you need any further help and I'll do my best to point you in the right direction. |
Alright, this has been resolved with #319. Users should now be able to run their own server on any infrastructure of their choosing. Additionally, the above Heroku deployment steps have been simplified and users can simply click the "Deploy to Heroku" button in the README rather than forking the repo and deploying everything manually. |
@alexwaibel - is this part still true, or has this been merged to upstream (i.e., this, eduardoboucas, repo)? Thanks in advance, I'm just getting started on this journey and hope to produce some useable documentation for the "as of today" approach to getting staticman running on Heroku. |
@travisdowns I would now recommend forking the dev branch of this (eduardoboucas) repo. Master works fine, but the dev branch has a full suite of passing tests that I haven't gotten around to merging the fixes for into master yet. Best of luck and feel free to ask any follow up questions you might have here. |
@alexwaibel - thanks for the speedy reply! I'll probably stick to I've already used the "deploy to heroku" button the readme, which has presumably deployed this repo, not a fork. Is that a problem? I assume that all the me-specific config can be done in Heroku, or is there some advantage to making my own fork? I guess it gives me control over keeping up with changes? |
@travisdowns to clarify, using the deploy to heroku button you do not need to make your own fork. The button when viewing master should deploy this repos master branch. If you switch to viewing the README of the dev branch and click the button there, it should deploy the code from this repos dev branch. In any case, all configuration will be done by setting the configuration variables in heroku. Hope this helps clear things up. |
@alexwaibel - thanks, if you are still willing, here's my next question: I need to create and update the Second, I guess it is obviously wrong to include things like my github personal access token in a public repo: is the suggestion to make the repo private or is there a way to store this info in a heroku-specific safe way? |
Also can you briefly explain the purpose of the github private access token (presumably allowing access to send the pulll requests), and the ssh private key (not clear)? |
@travisdowns you're correct about the GitHub access token, that is the personal access token which allows GitHub to make PRs etc on your repo. The SSH private key allows some fields to be encrypted before being sent in the comment creation request, though to be honest I'm less familiar with this functionality. |
@alexwaibel - thanks. I am still thinking about the secrets. In issue #311 there is some implication that Heroku env vars can be used at least for the private key, but the rest of the discussion diverges and so I am left uncertain how to deploy these secrets. |
@alexwaibel - actually #315 makes a better reference as it was started by someone you might know :) and it mentions |
@travisdowns Not sure I understand your question, but to add a private key to a server deployed on heroku, you add a config variable with key RSA_PRIVATE_KEY and the value being the text of the PEM key. Be sure to replace any newline characters with '\n' as the key string should be all on one line. All other config variables can be set in heroku in a similar manner. |
@alexwaibel - my question is that the node.js app that implements staticman needs a So I will copy say the existing How is this possible in the context of a Heroku dyno deployed from this repo? I can't add that file to this repo. Even if I add that file to my fork on github, it would be exposed. The usual way to add secrets to a Heroku deployed via github is via "config vars" which are really environment vars. Your #315 suggests this is possible, since you talk about adding heroku config vars with very similar names to those mentioned in the |
@travisdowns in the case of a Heroku deployed instance, you do not need a config.*.json file and instead these config values are set using "config vars" aka environment variables. |
Well thanks, that's what I was missing! |
Even though I looked at this page a couple times, I never picked up on that - but it is in fact documented there... |
Thanks @alexwaibel - I got it all working and wrote up the process here. Maybe it can be of use to someone else. I found a couple of issues in the error handling and submitted PRs for them. |
@travisdowns thank you for your contributions! It may take me some time to review those PRs as I've gotten busy with finishing up school. I'll definitely take a look when I can though. |
Mostly just making this to point other issues to and to formally document the current issues with the repo.
The current master and dev branches appear to build with minimal configuration of a simple github token and a private key though tests fail to start on either branch.
I'm working on fixing this and further testing and documenting the APi but in the meantime there remain various hosted instances which may or may not be working and that I won't link to as I haven't had time to verify any of them to be working myself.
The text was updated successfully, but these errors were encountered: