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
Related
-----> App not compatible with buildpack: https://buildpack-registry.s3.amazonaws.com/buildpacks/heroku/java.tgz
Could not find a pom.xml file! Please check that it exists and is committed to Git.
More info: https://devcenter.heroku.com/articles/buildpacks#detection-failure
! Push failed
This is seen in Heroku's web app
This is my repo: https://github.com/ericntd/spring-boot-heroku-demo
I already have "image": "heroku/gradle" in app.json
The buildpack information can be found under Settings tab, the Framework section. (should be heroku/gradle).
Besure to remove heroku/java build pack if it's there (auto-detected and added by Heroku)
Alternative is to use the Heroku CLI and set the build pack desired (gradle)
I have an app on Heroku. According to the Heroku App deploy guide I followed the below steps to modify the master.
Steps to make the push on Heroku
$ git add .
$ git commit -am "make it better"
$ git push Heroku master
The build of deploy was successful but the changes didn't reflect on the browser. I used hard refresh multiple times but didn't work.
If your app requires a build step to compress and combine assets and you are not seeing recent changes, then it's likely that you are forgetting to run that build step.
If you are using package such as parcel-bundler. you should run it before you deploy it. That would solve the issue.
You can read more on how to run it automatically whenever you deploy your app from here.
https://devcenter.heroku.com/articles/node-best-practices#hook-things-up
My Gitlab CI Auto DevOps job failed with
Status: Downloaded newer image for gliderlabs/herokuish:latest
-----> Unable to select a buildpack
ERROR: Job failed: exit code 1
I've gone through
Auto DevOps and
Getting started with Auto DevOps
and am still not sure where I should put the buildpack.
Mine should be heroku-buildpack-go, which I've lost track where I get that from.
My repo consist only a single-character README.md, and the "Hello, playground" main.go.
Conclusion:
Thanks to David's comprehensive explanation, I was able to get DevOps started with correct buildpack:
From this I would conclude that your single .go file at the root of the directory tree does not meet the activation criteria for auto-building Go projects. I'd suggest picking one of the dependency managers in the requirements above and modifying your project to support it.
FTA, I just did touch go.mod then git add & git push and the AutoDevops started building my GO project indeed.
However it seems to me that Gitlab AutoDevops is not able to build any GO projects very easily, as I get the following error (with project variable TRACE=true):
...
!! The go.mod file for this project does not specify a Go version
!!
!! Defaulting to go1.11.1
!!
!! For more details see: https://devcenter.heroku.com/articles/go-apps-with-modules#build-configuration
!!
-----> Installing go1.11.1
-----> Fetching go1.11.1.linux-amd64.tar.gz... done
!! Installing package '.' (default)
!!
!! To install a different package spec add a comment in the following form to your `go.mod` file:
!! // +heroku install ./cmd/...
!!
!! For more details see: https://devcenter.heroku.com/articles/go-apps-with-modules#build-configuration
!!
-----> Running: go install -v -tags heroku .
go: cannot determine module path for source directory /tmp/build (outside GOPATH, no import comments)
ERROR: Job failed: exit code 1
The easier solution is to use .gitlab-ci.yml file instead, documented in
https://blog.boatswain.io/post/build-go-project-with-gitlab-ci/
(and followed up at Gitlab CI - Start Shared Runner for normal repos).
From the AutoDevops documentation:
Auto Build creates a build of the application in one of two ways:
If there is a Dockerfile, it will use docker build to create a Docker image.
Otherwise, it will use Herokuish and Heroku buildpacks to automatically detect and build the application into a Docker image.
Then looking at the build activation criteria, as per the Heroku Go buildpack documentation:
This buildpack will detect your repository as Go if you are using either:
go modules
dep
govendor
glide
GB
Godep
Or more specifically for godep, govendor or GB:
The Heroku Go buildpack is used when an application meets one of the following requirements:
has a Godeps/Godeps.json file, identifying the application as being managed by godep;
has a vendor/vendor.json file, identifying the application as being managed by govendor;
has a src directory, which has sub directories, contains one or more .go files, identifying the application as being managed by gb.
From this I would conclude that your single .go file at the root of the directory tree does not meet the activation criteria for auto-building Go projects. I'd suggest picking one of the dependency managers in the requirements above and modifying your project to support it. After that AutoDevops should start building your project.
If you are still having issues after that, this debugging note might help:
After making sure that the project meets the buildpack requirements;
if it still fails, setting a project variable TRACE=true will enable verbose logging which​ may help to continue troubleshooting.
I have a template of a clojurescript application from https://github.com/Day8/re-frame-template. So I want to deploy that template without any modifications to Heroku. So I followed the instructions on the README
lein clean lein cljsbuild once min. Then I follow the instructions on Heroku as well on deploying clojure on https://devcenter.heroku.com/categories/clojure-support
But when I check if the application runs all I get is an application error.
So my questions are:
How does one build and deploy a clojurescript app to heroku?
What is the difference in deploying a clojurescript app vs a clojure app
Do I need a clojure server in order to run clojurescript?
How does one even run a standalone clojurescript app on the desktop?
How is the generated app.js related to running a clojurescript app?
I have found it pretty easy to deploy and run a clojure app on Heroku as well as a standalone applicaton on my desktop, I was hoping the same would be true for clojurescript.
Edited:
The error is here: https://floating-depths-33030.herokuapp.com/
To clear the topic for future people finding heroku + clj/cljs, following is a list of working examples. The clojure support on heroku means you can have Clojure webapp deployed. But cljs (like re-frame) actually is pure javascript, have nothing to do with heroku clojure support.
https://github.com/kawasima/back-channeling
https://github.com/zerg000000/table-tmpl
To deploy a re-frame application to Heroku one needs a clojure server, this is where ring comes in. In order to add ring one needs to add +handler while creating a new re-frame project as so:
lein new re-frame <project-name> +handler
This will create a project with a configuration that allows it to be deployable to Heroku.
Steps to deploy to Heroku:
lein clean
lein with-profile prod uberjar
git init
git add .
git commit -m "first commit"
git push heroku master
heroku ps:scale web=1
heroku open
This is application is now readily accessible.
Currently my Heroku CI tests are triggered on all git push to master branch at Github.
Is it possible to avoid triggering CI tests if specific files are being pushed, such as README.md?
Pretty sure heroku processes the .slugignore file for CI as there's an open issue now for ignoring it: https://github.com/heroku/heroku-ci/issues/39
The slugignore docs say
The .slugignore file causes files to be removed after you push code to Heroku and before the buildpack runs.
I don't use heroku ci so I wasn't able to test for sure. YMMV