Sto provando a pubblicare la mia app Laravel su Heroku. Ho escluso il file composer.lock da .gitignore, e ha creato una Procfile contenenteHeroku non riconosce la mia app Laravel come app PHP e non installa compositore
web: vendor/bin/heroku-php-apache2 public
ho creato il mio app con
heroku create myapp;
git push heroku master;
Poi ho ottenere il seguente risultato:
git -c diff.mnemonicprefix=false -c core.quotepath=false -c credential.helper=sourcetree push -v --tags heroku master:master
Pushing to https://git.heroku.com/myapp.git
POST git-receive-pack (1914 bytes)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Node.js app detected
remote: -----> Resetting git environment
remote:
remote: PRO TIP: Specify a node version in package.json
remote: See https://devcenter.heroku.com/articles/nodejs-support
remote:
remote: -----> Defaulting to latest stable node: 0.10.35
remote: -----> Downloading and installing node
remote: -----> Exporting config vars to environment
remote: -----> Installing dependencies
remote: npm WARN package.json [email protected] No repository field.
remote: -----> Cleaning up node-gyp and npm artifacts
remote: -----> Building runtime environment
remote: -----> Discovering process types
remote: Procfile declares types -> web
remote:
remote: -----> Compressing... done, 9.6MB
remote: -----> Launching... done, v5
remote: https://myapp.herokuapp.com/ deployed to Heroku
remote:
remote: Verifying deploy... done.
To https://git.heroku.com/myapp.git
5b1c663..0dff021 master -> master
updating local tracking ref 'refs/remotes/heroku/master'
Completed successfully
Se sfoglio la mia app, tuttavia ottengo un errore dell'applicazione. Quando guardo ai miei log, si dice
app[web.1]: bash: vendor/bin/heroku-php-apache2: No such file or directory
ho il sospetto che in qualche modo, Heroku non ha fatto compositore installare, in quanto non è nella mia uscita git, e forse non ha nemmeno riconoscere che la mia l'app è un'app PHP? Per essere sicuro, ho anche incluso un file index.php vuoto nella mia root. Non ha aiutato
Cosa mi manca qui?
Questo non ha funzionato per me. Ma 'heroku buildpacks: imposta https: // github.com/heroku/heroku-buildpack-php' come per [questo collegamento] (https://github.com/heroku/heroku-buildpack-php) ha funzionato. – Raghuram
Grazie Raghuram, anche questo non ha funzionato, ma il comando che hai fornito è stato :-) – Sormano