copy heroku app local - django

A customer of mine has a Heroku Python/Django application that they have asked me to take a look at and I am trying to understand the process of getting it running on my local Windows 7 laptop. I have been searching the net without any success. Does anyone have a suggestions or guides on how to do this.

Please have a look here : Collaborating with Others
They should add you as a collaborator so you can git clone the project files. They can do it via the heroku toolbelt installed on their computer (in command line) or via the Dashboard heroku

Related

How to launch an instance of my Flask app on Heroku

I am having a hard time deploying my little flask app to Heroku. I created it in visual studio community and just want to deploy it now to Heroku.
App code:
https://github.com/Phasor/QR-Site-2020
I signed up for a free account at Heroku and am following this guide: https://devcenter.heroku.com/articles/getting-started-with-python#deploy-the-app
I ran the following commands in their CLI:
git clone https://github.com/heroku/QR-Site-2020.git
heroku create
git push heroku master
When I write heroku ps:scale web=1 I get the following error:
Couldn't find that process type (web).
Looking for advice online it seems I need to define something called a Procfile. I have tried to do that and defined it as:
web: gunicorn runserver:app although I am very unsure that is correct (I normally just hit the "play" button in VS to run the app locally). Adding the Procfile does not solve the error message. I believe it should not hav the .txt extension but not sure you can create a text file without that in VS.
Originally I was not using gunicorn but think I may need to use that for Heroku so I added that to my requirements.txt.
Can anyone give me any pointers? Thanks

Deploy Django project with MSSQL DB in Local Server

I am new in Django and this will be my very FIRST Times web deploying. So I am trying to deploy my project to the local server and My project stack is Django with MSSQL so obviously I will need Window.
I was read the documentation and I think I will need WSGI and As the documentation say to deploy with gunicron or uWSGI but both are supported for Unix and not for window. So How can I start this one? This will be the first question.
I would like to know whether I am doing is correct or not.
Now I copy my project to the local server and when I try to run my project like python manage.py runserver it asks me to install Django and other but I thought this environment is working at well my computer and all of the needed application is already installed in the environment. So I still need to install all of my needed apps like Django to this environment again?
If u have any tutorial or can guide me to some useful site, I will be very very appreciated.
Anything u want to know further, Just let me know.
Thanks.

Deploy Django app with Docker

I'm attempting to deploy a Django app via docker, first locally, and then to a cloud server. I could not find an answer to my initial question before I attempt this: if I run docker-machine create, I'm guessing this should be run from within my virtualenv, right?
This would then grab all of my specific app dependencies, and begin to build certificates to throw in the container? If not, please explain otherwise..
Yes you are correct.
I will try to help you by my experience, if you wanna deploy django apps via docker.
First you need to setup docker machine in your local machine. Please see the
instruction. By default driver that will be used is --driver
virtualbox default.
List what kind of specifics dependencies images of your apps. Ex:
you need nginx, postgres, uwsgi, or you need to fetch an image then
modified that image you can use dockerfile (its the best practice
for you).
I suggested you to use docker-compose. Really its make our project
pretty easy to manage. You have to define all images that you need
for your app in docker-compose file Please read this reference.
After you finished develop your app then you want to deploy in production server (cloud) you just need to copy all your project then running your docker-compose. All images dependencies will be automatically pulled in the cloud.
As a reference, you can see this project (this is an open source project that I developed.) On that project, I use make file to manage docker-compose command and it make easy to manage.
An example of dockerfile
An example of docker-compose.yml
An example of Makefile
Hope this will help you.

How to use vagrant to develop on django locally and then deploy to EC2/Azure?

I chose Vagrant so that other developers in my team can quickly start contributing to the project. Is there anyway we can also make it easy for the developed code to be deployed on EC2 or Azure servers? If there are any articles on the optimal setup, please point me to them. Thanks!
The first video of Getting started with Django shows how to use Vagrant for locally Django developing and how to use it for deploying it to Heroku, you may want to use the first part of the tutorial (the one related with the local development). For the second it depends how you are going to deploy it, but as long as your code will be in a Git repository, you could clone it to EC2/azure from git.

Is it possible to deploy a django project to heroku without putting the project in git?

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>