This is my first time using heroku and I'm having some troubles deploying my small Suave web app. After reviewing the docs here, I understand that I need to set up a Procfile so that heroku knows how to run my application.
Here's a picture of my basic file structure:
And my Procfile contains only a single line:
web: mono /bin/Debug/SuaveTest.exe
After pushing these files to heroku, I get an error when trying to view the application.
I'm obviously doing something wrong here and I definitely would appreciate any and all help to get this running.
EDIT
I've changed my project settings to target .NET 4.5 instead of 4.5.1. This removed some warnings during my build. After changing my Procfile to the following :
web: mono bin/Release/SuaveTest.exe
I'm still receiving the same application error when visiting the site, even though the build says everything went well. I am suspicious that the root cause of all my issues is because heroku is unable to discover what process types I'm using in my project (which you can see below).
remote: Build succeeded.
remote: 0 Warning(s)
remote: 0 Error(s)
remote:
remote: Time Elapsed 00:00:04.4188560
remote: -----> Discovering process types
remote: Procfile declares types -> (none)
remote:
remote: -----> Compressing...
remote: Done: 69.2M
remote: -----> Launching...
remote: Released v15
Related
I am trying to deploy a Flask app to Heroku and I keep getting this error. Anyone who can help me with this?
Enumerating objects: 9, done.
Counting objects: 100% (9/9), done.
Delta compression using up to 4 threads
Compressing objects: 100% (7/7), done.
Writing objects: 100% (9/9), 3.06 KiB | 184.00 KiB/s, done.
Total 9 (delta 0), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: ! No default language could be detected for this app.
remote: HINT: This occurs when Heroku cannot detect the buildpack to use for this application automatically.
remote: See https://devcenter.heroku.com/articles/buildpacks
remote:
remote: ! Push failed
remote: Verifying deploy...
remote:
remote: ! Push rejected to expensetracker-api-heroku.
remote:
To https://git.heroku.com/expensetracker-api-heroku.git
! [remote rejected] secret-branchh -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/expensetracker-api-heroku.git'
Based on the UPDATED question, the error message is hinting at the problem:
No default language could be detected for this app.
You need to tell Heroku what kind of app you are deploying. For Python apps (i.e. Flask), you need to have one of the following files in your top-level git directory, as described in the Expected files for Python section of Deploying Python and Django Apps on Heroku docs:
Heroku automatically identifies your app as a Python app if any of the
following files are present in its root directory:
requirements.txt
setup.py
Pipfile
If none of these files is present in your app’s root directory, the
Python buildpack will fail to identify your application correctly.
Take note of the the warning at the end that if none of the files are present, the Python buildpack will faill.
The simplest here is to add a requirements.txt file. You can generate this by doing:
pip freeze > requirements.txt
and it looks like this:
Flask==1.0.2
Flask-Scss==0.5
gunicorn==19.7.1
isort==4.3.3
itsdangerous==0.24
Jinja2==2.10.1
...
Add that to the top-level of your git directory.
Then, for Flask, you need to add a couple more files:
runtime.txt
This specifies the Python version of your app, as described in Specifying a Python Runtime
python-3.7.3
Procfile
This is described in this post Heroku Flask Tutorial Procfile Meaning and I suggest you take a look. The contents depends on how you instantiated your Flask app instance, and it looks like this:
web: gunicorn app:app --log-file=-
If you're still having problems, I highly recommend going through the Heroku tutorial docs, especially Getting Started on Heroku with Python.
If I go to the the build log I see the following:
-----> Node.js app detected
FATAL: ROOT_URL is not defined.
! Push rejected, failed to compile Node.js app.
! Push failed
This is what I am getting in my terminal:
remote: Building source:
remote:
remote: -----> Node.js app detected
remote: FATAL: ROOT_URL is not defined.
remote: ! Push rejected, failed to compile Node.js app.
remote:
remote: ! Push failed
remote: Verifying deploy...
remote:
remote: ! Push rejected to virtually-viral.
remote:
To https://git.heroku.com/virtually-viral.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/virtually-viral.git'
NOTE: I do not know what to do to fix this and get my app working, I have checked multiple discussions on people having a somewhat similar problem but I was not able to fix it with their solutions.
I don't know much about Meteor so I'm not sure why this works in development, nor can I find any canonical list of critical settings that are required for it to work. The closest I can find is the documentation for Meteor.absoluteUrl (bold added):
Generate an absolute URL pointing to the application. The server reads from the ROOT_URL environment variable to determine where it is running. This is taken care of automatically for apps deployed to Galaxy, but must be provided when using meteor build.
You should be able to get past this issue by setting the ROOT_URL variable on Heroku, e.g.
heroku config:set ROOT_URL=https://virtually-viral.herokuapp.com
or through the web interface.
I am trying to follow the official tutorial on how to deploy apps on Heroku
I am however getting the following error:
remote: Precompiled aqueduct:aqueduct.
remote: Precompiled test:test.
remote: *** Running pub build
remote: Building with "pub build"
remote: Dart 2 has a new build system. Learn how to migrate from pub build and
remote: pub serve: https://webdev.dartlang.org/dart-2
remote: ! Push rejected, failed to compile Dart app.
I can't seem to find any hints on what I can change to fix the error (It shouldn't really be using pub build or serve. unless aqueduct calls it under the hood)
have a web folder in the root of your project causes the buildpack to try and run 'pub build'
I'm trying to use https://github.com/ryandotsmith/null-buildpack
and have compiled web process version(linux x64)
but when i'm doing git push heroku master process hangs on
remote: Compressing source files... done.
remote: Building source:
remote:
remote: Build stream timed out, reverting to polling...............
Procfile:
web: /app/bin/www
Was caused by a heroku issue, resolved now
https://status.heroku.com/
I'm trying to follow the tutorial at https://mmcgrana.github.io/2012/09/getting-started-with-go-on-heroku. Initially everything seems to work:
ceiroa-ltm:my_heroku_app ceiroa$ heroku create -b https://github.com/kr/heroku-buildpack-go.git
Creating glacial-badlands-6720... done, stack is cedar-14
BUILDPACK_URL=https://github.com/kr/heroku-buildpack-go.git
https://glacial-badlands-6720.herokuapp.com/ | https://git.heroku.com/glacial-badlands-6720.git
Git remote heroku added
ceiroa-ltm:my_heroku_app ceiroa$ git push heroku master
Counting objects: 10, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (6/6), done.
Writing objects: 100% (10/10), 925 bytes | 0 bytes/s, done.
Total 10 (delta 0), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Fetching custom git buildpack... done
remote: -----> Go app detected
remote: -----> Installing go1.3.3... done
remote: -----> Running: godep go install -tags heroku ./...
remote: -----> Discovering process types
remote:
remote: -----> Compressing... done, 1.5MB
remote: -----> Launching... done, v4
remote: https://glacial-badlands-6720.herokuapp.com/ deployed to Heroku
remote:
remote: Verifying deploy... done.
To https://git.heroku.com/glacial-badlands-6720.git
* [new branch] master -> master
However, no dynos are spinned:
ceiroa-ltm:my_heroku_app ceiroa$ heroku ps
ceiroa-ltm:my_heroku_app ceiroa$
And the app gives an error:
What am I doing wrong?
I tried a bunch of things that didn't work:
downgrade go version (to match the one defined in https://github.com/kr/go-heroku-example/blob/master/Godeps/Godeps.json)
move from default Eclipse Go structure to one without src, bin, or pkg inside project
use hyphens instead of underscores (for project name and in Procfile and Godeps.json)
define full identifier in Godeps.json
At the end and started from scratch again, creating the project from the command line instead of from Eclipse, and this worked.
From the things above, I can rule out #1 and #4 as fixes, as I'm back to using the same config I initially had.
Another thing that was throwing me off was references to ".godir" in different websites and posts. I don't know what this file used to be used for, but it doesn't seem necessary any more.
I'm going to point to Eclipse and its Go plugin as the culprits, for now.
Heroku now officially supports Go and has a Getting Started guide.