I am creating sample application on heroku as per documentation getting-started-with-go
It works till Step 3 the first deployment (deploy-the-app)
Problem starts when dependency are added at (push-local-changes)
Commands Executed
go version
heroku login
go get github.com/heroku/go-getting-started/cmd/...
cd %GOPATH%/src/github.com/heroku/go-getting-started
git remote -v
heroku create
git push heroku master
heroku open
heroku ps:scale web=1
go get -u github.com/tools/godep
godep restore
go get -u github.com/russross/blackfriday
notepad Godeps/Godeps.json
notepad cmd\go-getting-started\main.go
godep save ./...
go install ./...
heroku local
git add -A .
git commit -m "Markdown demo dependency"
git push heroku master
heroku open mark
Output
Microsoft Windows [Version 10.0.10240]
(c) 2015 Microsoft Corporation. All rights reserved.
C:\Windows\system32>go version
go version go1.6 windows/amd64
C:\Windows\system32>heroku login
Enter your Heroku credentials.
Email: 01.mandar#gmail.com
Password (typing will be hidden):
Logged in as 01.mandar#gmail.com
C:\Windows\system32>go get github.com/heroku/go-getting-started/cmd/...
C:\Windows\system32>cd %GOPATH%/src/github.com/heroku/go-getting-started
c:\Go\src\github.com\heroku\go-getting-started>git remote -v
origin https://github.com/heroku/go-getting-started (fetch)
origin https://github.com/heroku/go-getting-started (push)
c:\Go\src\github.com\heroku\go-getting-started>heroku create
Creating app... done, stack is cedar-14
https://lit-lake-35772.herokuapp.com/ | https://git.heroku.com/lit-lake-35772.git
c:\Go\src\github.com\heroku\go-getting-started>git push heroku master
Counting objects: 353, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (225/225), done.
Writing objects: 100% (353/353), 203.07 KiB | 0 bytes/s, done.
Total 353 (delta 70), reused 353 (delta 70)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Go app detected
remote: -----> Checking Godeps/Godeps.json file.
remote: -----> Installing go1.6... done
remote: -----> Running: go install -v -tags heroku ./...
remote: github.com/heroku/go-getting-started/vendor/gopkg.in/bluesuncorp/validator.v5
remote: github.com/heroku/go-getting-started/vendor/github.com/gin-gonic/gin/render
remote: github.com/heroku/go-getting-started/vendor/github.com/manucorporat/sse
remote: github.com/heroku/go-getting-started/vendor/github.com/mattn/go-colorable
remote: github.com/heroku/go-getting-started/vendor/golang.org/x/net/context
remote: github.com/heroku/go-getting-started/vendor/github.com/gin-gonic/gin/binding
remote: github.com/heroku/go-getting-started/vendor/github.com/mattn/go-isatty
remote: github.com/heroku/go-getting-started/vendor/github.com/gin-gonic/gin
remote: github.com/heroku/go-getting-started/cmd/go-getting-started
remote: -----> Discovering process types
remote: Procfile declares types -> web
remote:
remote: -----> Compressing...
remote: Done: 3.1M
remote: -----> Launching...
remote: Released v3
remote: https://lit-lake-35772.herokuapp.com/ deployed to Heroku
remote:
remote: Verifying deploy... done.
To https://git.heroku.com/lit-lake-35772.git
* [new branch] master -> master
c:\Go\src\github.com\heroku\go-getting-started>heroku open
c:\Go\src\github.com\heroku\go-getting-started>go get -u github.com/tools/godep
c:\Go\src\github.com\heroku\go-getting-started> godep restore
c:\Go\src\github.com\heroku\go-getting-started>
c:\Go\src\github.com\heroku\go-getting-started>go get -u github.com/russross/blackfriday
c:\Go\src\github.com\heroku\go-getting-started>notepad Godeps/Godeps.json
c:\Go\src\github.com\heroku\go-getting-started>notepad cmd\go-getting-started\main.go
c:\Go\src\github.com\heroku\go-getting-started>godep save ./...
c:\Go\src\github.com\heroku\go-getting-started>notepad Godeps/Godeps.json
c:\Go\src\github.com\heroku\go-getting-started>
c:\Go\src\github.com\heroku\go-getting-started>go install ./...
c:\Go\src\github.com\heroku\go-getting-started>heroku local
[OKAY] Loaded ENV .env File as KEY=VALUE Format
[OKAY] Trimming display Output to 98 Columns
10:01:41 AM web.1 | [GIN-debug] [WARNING] Running in "debug" mode. Switch to "release" mode in production.
10:01:41 AM web.1 | - using env: export GIN_MODE=release
10:01:41 AM web.1 | - using code: gin.SetMode(gin.ReleaseMode)
10:01:41 AM web.1 | [GIN-debug] GET /static/*filepath --> github.com/heroku/go-getting-started/vendor/github…
10:01:41 AM web.1 | [GIN-debug] HEAD /static/*filepath --> github.com/heroku/go-getting-started/vendor/github…
10:01:41 AM web.1 | [GIN-debug] GET /mark --> main.main.func1 (2 handlers)
10:01:41 AM web.1 | [GIN-debug] Listening and serving HTTP on :5000
10:01:56 AM web.1 | [GIN] 2016/04/08 - 10:01:56 | 404 | 0 | [::1]:50713 | GET /
10:02:15 AM web.1 | [GIN] 2016/04/08 - 10:02:15 | 200 | 0 | [::1]:50714 | GET /mark
[WARN] Interrupted by User
[DONE] Killing all processes with signal SIGINT
10:02:32 AM web.1 Exited Abnormally
Terminate batch job (Y/N)? y
c:\Go\src\github.com\heroku\go-getting-started>git add -A .
warning: LF will be replaced by CRLF in Godeps/Godeps.json.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in Godeps/Readme.
The file will have its original line endings in your working directory.
c:\Go\src\github.com\heroku\go-getting-started>git commit -m "Markdown demo dependency"
[master warning: LF will be replaced by CRLF in Godeps/Godeps.json.
The file will have its original line endings in your working directory.
44f22d6] Markdown demo dependency
warning: LF will be replaced by CRLF in Godeps/Godeps.json.
The file will have its original line endings in your working directory.
12 files changed, 5500 insertions(+), 7 deletions(-)
create mode 100644 vendor/github.com/russross/blackfriday/.gitignore
create mode 100644 vendor/github.com/russross/blackfriday/.travis.yml
create mode 100644 vendor/github.com/russross/blackfriday/LICENSE.txt
create mode 100644 vendor/github.com/russross/blackfriday/README.md
create mode 100644 vendor/github.com/russross/blackfriday/block.go
create mode 100644 vendor/github.com/russross/blackfriday/html.go
create mode 100644 vendor/github.com/russross/blackfriday/inline.go
create mode 100644 vendor/github.com/russross/blackfriday/latex.go
create mode 100644 vendor/github.com/russross/blackfriday/markdown.go
create mode 100644 vendor/github.com/russross/blackfriday/smartypants.go
c:\Go\src\github.com\heroku\go-getting-started>git push heroku master
Counting objects: 21, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (17/17), done.
Writing objects: 100% (21/21), 39.28 KiB | 0 bytes/s, done.
Total 21 (delta 3), reused 9 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Using set buildpack heroku/go
remote: -----> Go app detected
remote: -----> Checking Godeps/Godeps.json file.
remote: -----> Using go1.6
remote: -----> Running: go install -v -tags heroku ./...
remote: vendor/github.com/russross/blackfriday/block.go:19:2: cannot find package "github.com/shurcooL/sanitized_anchor_name" in any of:
remote: /tmp/build_36053c1b0568bf24dcdcf90c103b1104/.heroku/go/src/github.com/heroku/go-getting-started/vendor/github.com/shurcooL/sanitized_anchor_name (vendor tree)
remote: /app/tmp/cache/go1.6/go/src/github.com/shurcooL/sanitized_anchor_name (from $GOROOT)
remote: /tmp/build_36053c1b0568bf24dcdcf90c103b1104/.heroku/go/src/github.com/shurcooL/sanitized_anchor_name (from $GOPATH)
remote:
remote: ! Push rejected, failed to compile Go app
remote:
remote: Verifying deploy....
remote:
remote: ! Push rejected to lit-lake-35772.
remote:
To https://git.heroku.com/lit-lake-35772.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/lit-lake-35772.git'
c:\Go\src\github.com\heroku\go-getting-started>heroku open mark
c:\Go\src\github.com\heroku\go-getting-started>
I don't know why your commands didn't work but the problem is that the directory vendor/github.com/shurcooL/sanitized_anchor_name wasn't committed to your Git repo. The command godep save ./... should have added that repo to Godeps/Godeps.json and their files to vendor/, and the command git add -A . should have added them. But for some reason, they weren't added to your commit.
Try to run godep save ./... again and make sure the repository github.com/shurcooL/sanitized_anchor_name is added to your local vendor/. Then, run git add, git commit and git push as you already did. It should work :-)
Related
josh#josh:~/my_projects/la_manne$ git push heroku master
Énumération des objets: 3, fait.
Décompte des objets: 100% (3/3), fait.
Écriture des objets: 100% (3/3), 230 octets | 230.00 Kio/s, fait.
Total 3 (delta 0), réutilisés 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Building on the Heroku-20 stack
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: !
remote: ! ## Warning - The same version of this code has already been built: 73ed9a909f2a7e80a0a45f0f5d86aa6c7fdd70c1
remote: !
remote: ! We have detected that you have triggered a build from source code with version 73ed9a909f2a7e80a0a45f0f5d86aa6c7fdd70c1
remote: ! at least twice. One common cause of this behavior is attempting to deploy code from a different branch.
remote: !
remote: ! If you are developing on a branch and deploying via git you must run:
remote: !
remote: ! git push heroku <branchname>:main
remote: !
remote: ! This article goes into details on the behavior:
remote: ! https://devcenter.heroku.com/articles/duplicate-build-version
remote:
remote: Verifying deploy...
remote:
remote: ! Push rejected to lamanne.
remote:
To https://git.heroku.com/lamanne.git
! [remote rejected] master -> master (pre-receive hook declined)
error: impossible de pousser des références vers 'https://git.heroku.com/lamanne.git'
remote: -----> Building on the Heroku-20 stack
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
https://github.com/heroku/heroku-buildpack-php#usage
You'll need to use at least an empty composer.json in your
application.
$ echo '{}' > composer.json
$ git add composer.json
$ git commit -m "add composer.json for PHP app detection"
If you also have files from other frameworks or languages that could
trigger another buildpack to detect your application as one of its
own, e.g. a package.json which might cause your code to be detected
as a Node.js application even if it is a PHP application, then you
need to manually set your application to use this buildpack:
$ heroku buildpacks:set heroku/php
This will use the officially published version. To use the default
branch from GitHub instead:
$ heroku buildpacks:set https://github.com/heroku/heroku-buildpack-php
Please refer to Dev Center for further usage instructions.
I've been trying to do it for a long time, and I never can, I keep creating files and folders, new .git, I try but it doesn't work! I've been wanting to host my discord py bot, but the command git push heroku master always gets an ERROR! Now I leave the logs! I have git installed I am logged into HEROKU and registered! I have a GITHUB account and I have repositories
C:\Users\ruben\Desktop\Discord\Bot\ValientBot>git push heroku master Enumerating objects: 4, done.
Counting objects: 100% (4/4), done.
Delta compression using up to 2 threads Compressing objects: 100% (3/3), done.
Writing objects: 100% (4/4), 2.57 KiB | 263.00 KiB/s, done.
Total 4 (delta 0), reused 0 (delta 0), pack-reused 0 remote: Compressing source files... done. remote: Building source: remote: remote: -----> Building on the Heroku-18 stack remote: -----> App not compatible with buildpack:
https://buildpack-registry.s3.amazonaws.com/buildpacks/heroku/python.tgz remote: More info: https://devcenter.heroku.com/articles/buildpacks#detection-failure remote: remote: ! Push failed remote: ! remote: !
## Warning - The same version of this code has already been built: eb6fced64ec14c05dd2f92e7cf40c0e2cd30a1ff remote: ! remote: ! We have detected that you have triggered a build from source code with version eb6fced64ec14c05dd2f92e7cf40c0e2cd30a1ff remote: ! at least twice. One common cause of this behavior is attempting to deploy code from a different branch. remote: ! remote: ! If you are developing on a branch and deploying via git you must run: remote: ! remote: ! git push heroku <branchname>:main remote: ! remote: ! This article goes into details on the behavior: remote: !
https://devcenter.heroku.com/articles/duplicate-build-version remote: remote: Verifying deploy... remote: remote: ! Push rejected to valient-bot. remote: To https://git.heroku.com/valient-bot.git ! [remote rejected] master -> master (pre-receive hook declined) error: failed to push some refs to 'https://git.heroku.com/valient-bot.git'
If the project you’re deploying uses main as its default branch name, use $ git push heroku main
instead of
$ git push heroku master
Heroku has updated default git branch name to main and this might be a reason for the error that you are having.
Building on Heroku takes too long.
This blog post describes how to deploy a Go binary to Heroku by hijacking the buildpack trigger. This still requires checking the binary into a Git repo. However, there is the heroku-builds addon that seems to be able to package up files as-is.
I usually deploy a statically compiled rust binary using Musl.
cd myapp
cargo build --release --target x86_64-unknown-linux-musl
export ARTIFACT_PATH=$PWD/target/x86_64-unknown-linux-musl/release
and then deploy:
heroku create myapp --buildpack https://github.com/ph3nx/heroku-binary-buildpack.git
heroku git:clone --app myapp
pushd myapp
mkdir ./bin
cp -v ${ARTIFACT_PATH}/myapp ./bin/
echo 'web: PORT=$PORT bin/myapp' > Procfile
git add -A; git commit -am 'init'
git push heroku master
git push heroku master output:
Enumerating objects: 8, done.
Counting objects: 100% (8/8), done.
Delta compression using up to 4 threads
Compressing objects: 100% (6/6), done.
Writing objects: 100% (8/8), 2.52 MiB | 1.73 MiB/s, done.
Total 8 (delta 0), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Building on the Heroku-20 stack
remote: -----> Using buildpack: https://github.com/ph3nx/heroku-binary-buildpack.git
remote: -----> Null app detected
remote: -----> Nothing to do.
remote: -----> Discovering process types
remote: Procfile declares types -> web
remote:
remote: -----> Compressing...
remote: Done: 2.5M
remote: -----> Launching...
remote: Released v3
remote: https://myapp.herokuapp.com/ deployed to Heroku
remote:
remote: Verifying deploy... done.
To https://git.heroku.com/myapp.git
* [new branch] master -> master
As you we can see, it's just a few files:
.
├── bin
│ ├── compile
│ ├── detect
│ ├── myapp
│ └── release
└── Procfile
1 directory, 5 files
There is a dropplet(vps) on digitalocean, the dropplet is built using dokku template. Following a bunch of instruction, I was able to set everything up. At least I think so. The problem appears during the build after git push. The log is here:
$ git push dokku master
Counting objects: 64, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (57/57), done.
Writing objects: 100% (64/64), 14.68 KiB | 0 bytes/s, done.
Total 64 (delta 4), reused 0 (delta 0)
remote: -----> Cleaning up...
remote: -----> Building ** from herokuish...
remote: -----> Adding BUILD_ENV to build environment...
remote: -----> Fetching custom buildpack
remote: -----> Node.js app detected
remote: -----> Installing node
remote: -----> Installing meteor
remote: Downloading Meteor distribution
remote:
remote: #
...
remote: ########################################################################
100.0%
remote:
remote: Meteor 1.2.1 has been installed in your home directory (~/.meteor).
remote:
remote: Now you need to do one of the following:
remote:
remote: (1) Add "$HOME/.meteor" to your path, or
remote: (2) Run this command as root:
remote: cp "/tmp/buildpacks/custom/meteor-o6l8/.meteor/packages/meteor-tool/1.1.10/mt-os.linux.x86_64/scripts/admin/launch-meteor" /usr/bin/meteor
remote:
remote: Then to get started, take a look at 'meteor --help' or see the docs at
remote: docs.meteor.com.
remote: -----> Bundling bundle
remote: -----> Building Meteor with ROOT_URL: http://****
remote: Killed
To dokku#****:**
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'dokku#****:**'
I am new to the theme. Where can I see what's gone wrong?
You might have too few resources to build meteor on your server. Please be sure you have at least 1GB of memory available. If you are on a smaller digital ocean droplet, you can also enable swap.
I have cloned it into dir ejabberd. Ran the following commands.
./autogen.sh
./configure
make rel
made a Procfile
web: ./rel/ejabberd/bin/ejabberdctl start
with the following line it.
heroku create -buildpack https :// github .com/archaelus/heroku-buildpack-erlang.git
then did
git push heroku master
its gives me the following error
root#Anubhav:/home/anubhav/new/ejabberd# git push heroku master
Counting objects: 25255, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (5322/5322), done.
Writing objects: 100% (25255/25255), 13.78 MiB | 167.00 KiB/s, done.
Total 25255 (delta 19874), reused 25251 (delta 19872)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Fetching custom git buildpack... done
remote:
remote: ! Push rejected, no Cedar-supported app detected
remote: HINT: This occurs when Heroku cannot detect the buildpack
remote: to use for this application automatically.
remote: See https: // devcenter.heroku.com/articles/buildpacks
remote:
remote: Verifying deploy...
remote:
remote: ! Push rejected to infinite-retreat-6912.
remote:
To https: //git.heroku.com/infinite-retreat-6912.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https: //git.heroku.com/infinite-retreat-6912.git'
What am I doing wrong?
I do not think ejabberd can be used as is on Heroku. There is several dependancies in C and lib required that are probably not available on Heroku. At least it has never been tested but I would be surprised if it worked.