requarks / wiki-heroku

Heroku deploy manifest for Wiki.js

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Deploy fails due to version API is no longer working

trungdtbk opened this issue · comments

Same here

In install.sh I change

VERSION=$(curl -L -s -S https://beta.requarks.io/api/version/stable) to
VERSION=$(curl -L -s -S https://raw.githubusercontent.com/Requarks/wiki-v1/master/CURRENT)

It install ok, but git not working and data is lost after dynos restart.

Deploy gets further with antoligy. Not clear how to setup oauth. Attempted setting up deploy keys and have local auth provider set to true. Getting error

2019-03-26T20:58:34.190207+00:00 app[web.1]: Error: You must enable at least 1 authentication strategy!

Deploy gets further with antoligy. Not clear how to setup oauth. Attempted setting up deploy keys and have local auth provider set to true. Getting error

2019-03-26T20:58:34.190207+00:00 app[web.1]: Error: You must enable at least 1 authentication strategy!

What have you change?

Just clone this project, and add your heroku git url

git remote add heroku https://git.heroku.com/my-wiki.git
git push heroku, or if you are on a branch, git push heroku mybranch:master

Also you need to change install.sh

VERSION=$(curl -L -s -S https://beta.requarks.io/api/version/stable) to
VERSION=$(curl -L -s -S https://raw.githubusercontent.com/Requarks/wiki-v1/master/CURRENT)

it should work.

What about changes to app.json and/or config.yml?

Just tried:

$ git clone https://github.com/Requarks/wiki-heroku.git
$ heroku create devnoops-wiki
edit install.sh
$ git commit -am "update version"
$ heroku open

getting:

'Application Error'
$ heroku logs

app[web.1]: 2019-03-27T15:08:17.275Z - error: [SERVER] Failed to connect to MongoDB instance. 2019-03-27T15:08:17.276635+00:00 app[web.1]: /app/wiki/node_modules/mongoose/lib/connection.js:723 2019-03-27T15:08:17.276638+00:00 app[web.1]: throw error; 2019-03-27T15:08:17.276640+00:00 app[web.1]: ^ 2019-03-27T15:08:17.276642+00:00 app[web.1]: 2019-03-27T15:08:17.276644+00:00 app[web.1]: Error: Invalid mongodb uri. Must begin with "mongodb://" 2019-03-27T15:08:17.276646+00:00 app[web.1]: Received: undefined

Sorry,
You need to create the heroku app from the wiki button first:

https://dashboard.heroku.com/new?button-url=https%3A%2F%2Fgithub.com%2FRequarks%2Fwiki-heroku&template=https%3A%2F%2Fgithub.com%2Frequarks%2Fwiki-heroku

You will notice that the build will fail, and then you clone project, change the remote for your heroku git remote.

No need to change app.json or config.yml, you will set your variables on that link for app creation,
after you change install.sh and push it, if your variables are correct you will have access to your wiki.

Creating the app with that url you will have all dynos already running for you.

If you dont want to use heroku pannel to set your variables, you can set then on app.json and probably will work.

Thanks for stickin with me

Similar outcome after retrying with below. What is mongodb required for? Backend isn't solely github?

how to set this in config.yml?

db: $(MONGODB_URI)

I chose the edit app.json route
$ git commit -am ""
$ git push heroku
$ heroku open
page has 'Application Error'
$ heroku logs

' app[web.1]: 2019-03-27T18:08:26.644Z - error: [SERVER] Failed to connect to MongoDB instance.
2019-03-27T18:08:26.645820+00:00 app[web.1]: /app/wiki/node_modules/mongoose/lib/connection.js:723
2019-03-27T18:08:26.645824+00:00 app[web.1]: throw error;
2019-03-27T18:08:26.645826+00:00 app[web.1]: ^
2019-03-27T18:08:26.645827+00:00 app[web.1]:
2019-03-27T18:08:26.645829+00:00 app[web.1]: Error: Invalid mongodb uri. Must begin with "mongodb://"
2019-03-27T18:08:26.645831+00:00 app[web.1]: Received: undefined'

I just provisioned mLab manually and the app is up it seems. Trying to figure out what login should be.

How do I set my wiki account username and password?

How do I setup github/gitlab ssh? It appears I need to provide the private key to the app somehow?

If you look on your app.json

"WIKI_ADMIN_EMAIL": { "description": "Email to use during root administrator account creation (default password: admin123)", "value": "marty@example.com" },
default password: admin123)

You can enter in your Mongo's Dyno and check if there's any users.
I belive you have to enter a new user manually.

If you cant cript your password, you maybe can try install locally(https://github.com/Requarks/wiki-v1)
and copy user and password from your local mongo to your heroku dyno mongo.

ok. Thanks.

Looks like this might be a good idea for connection to github/gitlab

https://elements.heroku.com/buildpacks/poetic-labs/git-ssh-key-buildpack

No love connecting to github using ssh. Getting error

app[web.1]: { code: 1, 2019-03-27T21:54:02.643800+00:00 app[web.1]: message: 2019-03-27T21:54:02.643801+00:00 app[web.1]: 'git --git-dir=repo/.git --work-tree=repo pull origin undefinedfailed with code 1', 2019-03-27T21:54:02.643802+00:00 app[web.1]: stderr: 2019-03-27T21:54:02.643806+00:00 app[web.1]: "fatal: 'undefined' does not appear to be a git repository\nfatal: Could not read from remote repository.\n\nPlease make sure you have the correct access rights\nand the repository exists.\n", 2019-03-27T21:54:02.643807+00:00 app[web.1]: stdout: '' }
any idea how I would set this if I have a heroku config env_var for GIT_SSH_KEY

# Only for SSH authentication: 125 privateKey: /etc/wiki/keys/git.pem

for basic auth I'm trying to use an OAuth token. Not working either. Same as above. Do I put the value of the token or the name of it in the config?

Fixed install script.