I got a task to deploy my app on Heroku.
My app is a tar.gz file that I extract and a command line I need to run.
How can that be deployed to Heroku?
All I can find in the documentation is git repository references.
Heroku uses git as it's deployment mechanism. You will have to extract your tar file locally, initialize a git repo within the directory, and then deploy that to Heroku.
Related
I've one repo sunixi and it has two projects sun-angular(angular) and sun-admin(spring boot) in ts-admin i'm building ts-angular via executions and moving dist into resources/static of sun-admin project after that i'm building the sun-admin. On local enviroment it is working fine but how can i do same in heroku deployment.
structure of repo
sunixi
---sun-angular
---sun-admin
in sun-admin i'm setting workingDirectory as ../sun-angular but while deploying to heroku i'm getting
Cannot run program "npm" (in directory "/tmp/build_02607c07/sun-angular"): error=2, No such file or directory
If you are using a monorepository strategy, an option is to use subdir buildpack to select where is the path of your folder: https://github.com/timanovsky/subdir-heroku-buildpack
If you want to deploy backend and frontend in the same heroku app, the project folder should contains a npm package. Otherwise, i will not work.
So, I'm trying to deploy a .jar file on Heroku. When I try to deploy it I get this error:
JAR file must have a .jar or .war extension.
I don't know what's going on, I downloaded the java plugin, I downloaded the Heroku CLI plugin.Idk what to do, here's the deploy command.
heroku deploy:jar C:\Users\My Name\Desktop\Tester Bot2\myfile.jar --app mybotapp
You need to escape backslashes and use quotation marks for your path:
heroku deploy:jar "C:\\Users\\My Name\\Desktop\\Tester Bot2\\myfile.jar" --app mybotapp
I can not understand what I need to change to make it.
I created a demo project from this blogpost with app.json and Procfile:
web: fsharpi-heroku WebsahrperSuaveHerokuExample1.sln
Next, I tried to deploy it to Heroku in accordance with these recommendations:
heroku create websahrper-with-suave-example --buildpack https://github.com/SuaveIO/mono-script-buildpack.git
heroku git:remote -a websahrper-with-suave-example
git push heroku master
There was an error in Heroku when building the project:
...
Import process completed.
-----> packages.config found, installing dependencies with nuget
Cannot open assembly 'install': No such file or directory.
! Push rejected, failed to compile SuaveFramework app
Could you suggest me a solution if there is one?
Have you tried here:
https://github.com/SuaveIO/heroku-getting-started
Fork it and click the Deploy to Heroku button.
Don't have the rep to comment on the above, but ademar's solution should cover as well as long as you don't have a file named "app.fsx"
The heroku buildpack checks to see if there is a script, then checks for a solution:
https://github.com/SuaveIO/mono-script-buildpack/blob/master/bin/compile#L66
Just make sure there is a .sln file in the project directory (can be empty, just needs to be present) or fork the buildpack and just make it default run mono $YOURPROJECT in the compile step.
When using an sln instead of a script, you need to change your Procfile to:
web: mono Path/execName.exe
How do I deploy my site from github to heroku?
nbp-229-179:portfolio folder admin$ git push heroku master
fatal: 'heroku' does not appear to be a git repository
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
nbp-229-179:portfolio folder admin$
You might want to look into the GitHub integration, which will allow you to link your heroku app with github, not do any git pushes to heroku anymore but have your application automatically deployed.
With pipelines, you can automatically deploy a staging app with every push to the master branch, and manually promote the staging deployment to production.
I'm trying to download a file from my app, when I'm running on localhost everything is fine and in using this path in order to download the file
../myapp/public/files/67784.pdf
But on Heroku I'm getting java.io.FileNotFoundException. How can I find location of the file on Heroku?
Thanks!
Public assets in Play are packaged in the Jar on compilation (makes it very convenient for moving everything around, and get them from a plugin or whatever). So you have to get them from you app Jar.
I think that you can use the Play's resource helper (http://www.playframework.com/documentation/2.2-SNAPSHOT/api/java/play/Application.html), but I haven't tried.
Play.Application.resource("public/filename")
Note that on Heroku, any file modification/addition on the server is lost whenever you redeploy, or restart or add an instance... The only files that persist are the ones in your Git repo.