Sorry for the basic question, but how can I fork an Heroku app to the local machine? I deployed a simple Django app, added some data to the app online and now I want to fork the app to my friend's laptop so he can continue to fill in the data for me (let say he don't have the internet). I tried heroku fork but it does not work, the forked repository doesn't have the data I added before and the account that I created for my friend...
I tried heroku fork but it does not work, the forked repository doesn't have the data I added before
That data must be pushed before:
git push heroku master
Then a fork can be done.
Note that forking an application doesn’t automatically create a new git remote in your current project.
Use heroku info to retrieve the Git URL of the new application and the set it manually.
Once you have the git url for the fork, you can clone it, and add an upstream remote url referencing the source heroku Git repo.
Your friend can then update his/her local clone of that fork without having to heroku fork each time.
Related
I am trying to deploy a webapp to Azure. I am following these directions https://azure.microsoft.com/en-us/documentation/articles/web-sites-python-create-deploy-django-app/
First step, I created a webapp (Django) on the portal.
Then it says to follow the directions to configure Continuous deployment using GIT in Azure App Service. This should apparently lead to my having a local directory of Django files. https://azure.microsoft.com/en-us/documentation/articles/web-sites-publish-source-control/
So I follow those directions, installing Git, creating a local repository, adding a webpage, enabling web app repository, deploying.
The webportal now shows that I have deployed ('active' deployment). However, when I go to the web app url, what's showing is NOT what I deployed, but rather what I guess is the default Django app with its urls (login, logout, contacts).
So then I create an actual Django app in my local directory (instead of the static index.html from the directions). I commit and push it to Azure. It shows as being deployed.
The result is the same as before: the default web app is showing.
So what I'm missing is the connection between my local repository and what's actually showing. Is there some way to pull the Azure default app into my local repository? (Once it's there, I'll be able to change it as I see fit.)
Things are working as expected, but you ended up overwriting the Django app in your first the Git commit. The Continuous Deployment instructions as written are generic to any deployment, even a blank Web App.
So what I'm missing is the connection between my local repository and what's actually showing. Is there some way to pull the Azure default app into my local repository? (Once it's there, I'll be able to change it as I see fit.)
All you need to do is git clone your repo after you've initialized your local Git repo on the Azure Web App. You've already gone through most of these steps, but I'll include them here for others who may be looking for this answer.
After you create the Django Web App from the Azure Marketplace/Gallery, scroll down to set up continuous deployment.
Choose Local Git repo.
Notice that you now have a Git Clone URL in both your Quickstart Essentials info and under All Settings >> Properties. Go ahead and copy this URL.
If you haven't already done so, you may need to set or reset your Deployment Credentials. You'll find this under All Settings. This will be your Git & FTP credentials. Note that this is actually the credentials for your Microsoft Account, not just this one Web App.
You already have Git installed from your first attempt. You should now be able to navigate to the folder you want to clone the repo into and run:
git clone <your_git_clone_url>
After you type in your password, you'll have a cloned repo of the Django Web App on your local system. cd into the directory and start working from there. Once you have changes, git add ., git commit, and git push them back to the repo in Azure to see your changes there.
I am trying to deploy a django project on openshift for testgin puposes. I tried to use this process described here but can't seem to be able to work it out. I successfully create my app using
rhc app create django python-2.6
But when I try to add the git it gives me the following error
fatal: Not a git repository (or any parent up to mount parent )
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
What am I doing wrong?
At creation time, Openshift should create a directory django with a skeleton WSGI application, and git folder containing the remotes needed so you can just git push its contents to the Openshift app repo.
If you are working in another directory, you have to git init and then add the remotes to Openshift.
I'm kind of new in this of heroku and github, but what I want to do is put a Django application in heroku to my github account. How can I do that from console or something?
You have a local git repository of your code that you pushed to heroku. Now you just got to http://github.com (create an account if you haven't yet) and a repository for your project. You will then get the instructions to push your existing code to the newly created repo.
I was wondering if it is possible to deploy to heroku with out putting my django project on git?
My another question. I already have my app on heroku. Now I want to make changes to it. But the computer I had the soruce code crashed. So how do I download my project files from heroku?
No. ( But there is a plugin to do that, but I would say why bother. But.. - https://github.com/ddollar/heroku-push)
But all you have to do is git init to setup a repo, and push to the heroku remote after setting up an app. You don't have to publish your repo anywhere.
You can get back your code by using:
heroku clone <appname>
I currently have a django project deployed on Heroku, but I would like to deploy another dummy Heroku app for testing purposes. The idea is that I can make changes to the dummy Heroku account on a git branch, see how it works live, and then merge and push to my actual Heroku project. Is this possible?
I haven't tried this but I don't see why it wouldn't be possible.
Just add another remote on git to the repository to your production heroku git address.
git remote add htest your_test_app_heroku.git
git remote add heroku your_actual_app_heroku.git