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

Heroku one-click deploy fails #741

Closed
pseudozach opened this issue May 18, 2018 · 13 comments
Closed

Heroku one-click deploy fails #741

pseudozach opened this issue May 18, 2018 · 13 comments

Comments

@pseudozach
Copy link

In the section How to Host An Instance of Silex
"For the lazy ones, there is the Heroku One-Click Deploy:" button fails because Heroku complains there are no app.json under https://github.com/silexlabs/Silex/tree/master.

@lexoyo
Copy link
Member

lexoyo commented May 21, 2018

Hello
Thank you for the report
Is it possible for you to add the app.json and submit a pull request?

@swakarm
Copy link
Contributor

swakarm commented Sep 2, 2018

Here is an example of 'app.json'
https://devcenter.heroku.com/articles/app-json-schema#example-app-json

@lexoyo
Copy link
Member

lexoyo commented Sep 3, 2018

Hi @swakarm
Would like me to guide you to add it yourself to Silex code?

@swakarm
Copy link
Contributor

swakarm commented Sep 4, 2018

I have submitted a pull request.
for app.json

@lexoyo
Copy link
Member

lexoyo commented Sep 5, 2018

It works great !

screenshot from 2018-09-05 12-44-39

There is still something to do for it to be perfect: as stated in Silex wiki here, we need to define some environment variables for Silex to work properly. I think it is possible to tell heroku to ask for the values when a user deploys Silex

@lexoyo
Copy link
Member

lexoyo commented Sep 5, 2018

Also the build on heroku fails: java: not found
We need to add the java "toolbelt" if I remembeer correctly
@swakarm could you look into it?
The link to try it out is https://heroku.com/deploy?template=https://github.com/silexlabs/Silex/tree/develop

@swakarm
Copy link
Contributor

swakarm commented Sep 6, 2018

I am still getting an error ,'No app.json located in the repo URL provided.'
Make sure that repo URL is true or not.
capture

@swakarm
Copy link
Contributor

swakarm commented Sep 6, 2018

I am new to Silex . So I am observing your source code. My schedule is also too busy. So I will try to solve problems whenever I will be free. So do not expect from me for more support. I am sorry for that. Thanks for making Silex builder opensource. Science is depended on selfless people like You, Who works without expecting profit.

@lexoyo
Copy link
Member

lexoyo commented Sep 6, 2018

I am still getting an error ,'No app.json located in the repo URL provided.' Make sure that repo URL is true or not.

Did you use this URL?
It is the one for develop branch
https://heroku.com/deploy?template=https://github.com/silexlabs/Silex/tree/develop

@swakarm
Copy link
Contributor

swakarm commented Sep 6, 2018

oh, I clicked button for one click deploy. Now I have tried 'develop' branch. It works.

@swakarm
Copy link
Contributor

swakarm commented Sep 7, 2018

Observing package.json

"Java not found" error is because of heroku could not find files in directory, which are described in script- 'build:js:release' and 'build:js:debug'

Also check at "dependency"
"google-closure-compiler": "20170218.0.0",
"google-closure-library": "20170218.0.1",

I think there is a problem with Google closure complier at heroku.
We have two options to solve this problem.

1.- Remove dependency of Google closure copmiler from source code of silex. (for heroku)
OR
2.- Compiling code with java script version of Google closure compiler which does not require JAVA
https://github.com/google/closure-compiler-js

@lexoyo
Copy link
Member

lexoyo commented Sep 7, 2018 via email

@lexoyo
Copy link
Member

lexoyo commented Sep 18, 2018

Hi
@pseudozach and @swakarm
I have added the env vars and buildpacks to app.json, it should work properly now
8d62548
Let me know if you find any bug
Thank you for your contributions!

@lexoyo lexoyo closed this as completed Sep 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants