I am creating a website on PHP.
I have cloned the source code. using git clone
Create an app on Heroku heroku create and deployed my code on heroku using command git push heroku master.
Now i want to check either my instance is running or not. How to check?
Thanks for your time.
You can run heroku open, which will open your app in your default web browser. Of course you can also manually navigate to your app's URL, which should be be https://<your-app-name>.herokuapp.com.
You can also run heroku ps which will show your app's dynos and their status.
Both of these heroku commands accept an --app argument in case you want to run them from outside of your project directory or have multiple apps configured.
As stated in official documentation of heroku
Ensure that at least one instance of the app is running:
heroku ps:scale web=1
Related
I have Laravel project at Gitlab repository and I want to connect it with Heroku. Is it possible to connect them even if the Heroku server is only a free subscription?
When I have new commits on Gitlab, I want it updates the Heroku server.
If it is possible, how can I do it?
Yes, it possible. Things needed:
Php and Laravel knowledge
Heroku user account
Git
For details you can follow any below link
https://appdividend.com/2018/04/17/how-to-deploy-laravel-project-on-heroku/
https://devcenter.heroku.com/articles/getting-started-with-laravel
https://medium.com/#sdkcodes/how-to-deploy-a-laravel-app-to-heroku-24b5cb33fbe
My PHP app is stored in Cloud9 and I deployed it to Heroku from Cloud9 Git terminal.
Now there is a .json file in the app files, has a value stored, which comes from a value entered by the user in a TextField in the User Interface of the app.
The question is that whenever the user changes the value in the TextField, and saves the changes (in the source code, saving corresponds to writing the changes to the .json file), will someone have to commit (using $ git commit) and push (using $ git push heroku master) these changes from Cloud9 to Heroku? Or will that happened automatically?
Your Heroku repo is simply a remote repo as far as cloud9 is concerned. Type:
git remote -v
in cloud9 to see your remotes.
Files from your cloud9 repo only get deployed to Heroku when you do a git push.
I am trying to use capistrano to deploy my php application to a server. For versionising the code, I am using GIT in combination with Bitbucket.
For CI process, I am using jenkins on a virtual machine with ip 192.168.65.68. When I develop on another virtual machine, I push changes to this machine and the CI process starts - this is working. Now I wanted to go one step ahead and use Capistrano to deploy the app (first to a new folder on the same CI machine). Within deploy.rb file of my project, I tried to connect with ssh to the project by using the same options I provide within jenkins to connect (192.168.65.68 = localhost):
set :repo_url, 'ssh://git#192.168.65.68:7999/nav/myrepo.git'
set :ssh_user, 'jenkins'
When I run "cap production deploy --trace", I get a connection error that the connection got blocked.
So my question is: Is my attempt to connect from the CI machine to the Bitbucket repo completely wrong? How do you connect via ssh to your repo and fetch the source code when using capistrano?
This is my first website (website itself is all done). I'm trying to upload my website files to my Openshift PHP 5.4 domain so when I click my OpenShift domain url, my website appears (pretty simple, right?). My Openshift account is set up. I've connected to it with FileZilla, and set up a private (or public) key. I've installed Ruby & Git. I followed everything here, and am stuck on this step:
Web Console
If you create an application from the web console, you’ll need to tell Git to clone the repository. Find the Git URL from the application page, and then run:
C:\> git clone <git_url> <directory to create>
I don't know what the "git_url" is supposed to be. Nor do I know what the "directory to create" is supposed to be. I don't know what OpenShift directory to put my website files in (when I connect with FileZilla) so that when I open my OpenShift domain url, I see my website (see below).
Again, my goal is to see my website when I open my OpenShift PHP 5.4 url. Where do I go from here?
Your problem is that you don't know what git is about, I recommend that you go read about it: https://git-scm.com/book/en/v1/Getting-Started
If you have your site ready and you've created an OpenShift app, do the following:
1) Grab the git url (you can find it by browsing to https://openshift.redhat.com/app/console/applications, clicking your app, and then copying the long address on the right, under "Source Code"), it should look something like this: ssh://afa231av#app-domain.rhcloud.com/~/git/app.git/
2) Open up a terminal (or use some git ui tool) and clone (download) your app with
git clone ssh://afa231av#app-domain.rhcloud.com/~/git/app.git
3) You should have a folder named app, now use the file explorer go inside it and paste in all your website
4) Go back to the terminal and do
cd app (or whatever name your app has)
git add .
git commit -m "Add my website"
git push origin master
Wait for it to finish, and if there are no errors, you're all done.
git_url: Go to OpenShift Web Console -> Application -> find and click your application, on the right there is Source Code panel with something like ssh://***.rhcloud.com/~/git/php.git/, this will be your git_url
directory_to_create: is just a name of directory that will be created that will contain your git repo on your local file system
When you clone this repo, you should copy your files to it, then commit and push to branch named 'master', and it will be automatically deployed on server.
I have never used Heroku before, but our client wants us to use it. An app is already set up on Heroku, and if I log in and check the app info it says that it is on the cedar stack.
Now I want to put some PHP files onto it. I've set up a remote, then used git init, add, commit, but when I try to use "git push heroku master" I get the error:
Heroku push rejected, no Cedar-supported app detected
I don't understand since the app has been set up as a cedar app? I've seen lots of people with the same error message, but all of the solutions seems to say it's something to do with gemfiles (I have no idea what they are), or to run git init again.
Does anyone have any other ideas on what the problem could be? I apologise if there isn't much info here, but as I say I've never used Heroku before, and have only used git for one other project (normally we use our own server which I can just drop PHP files into using a GUI).
Thanks
You need to have an index.php in the root for Heroku to detect the application type as PHP.