Forums

Clone App

Good day

Is it possible to clone existing web app that is currently on python anywhere without having to pull into a git repository?

I would like to have 2 web applications on python anywhere with two versions of the same app pointing to different domains. Please advise.

You could point two two web apps to the same code. You will just need two wsgi files.

I want to apply specific changes to the website where one will remain the same and the other will apply changes on the front end. Would this be possible if the two domains are pointing at the same web app? Alternatively will I be able to use subdomains for the one which I wish to apply changes to?

Just to make sure that I understand what you're asking:

  • You have a website running on PythonAnywhere
  • You want to start a new website
  • Initially the new website will just be a clone of the old website
  • In the future, you want to make changes to the new website, but leave the old website exactly as it is.

Is that correct? And if so, is there any possibility that changes that you make to the new website will in the future be moved back into the old website? Or will they be diverging in their functionality in the future, with no changes being made on one that also need to be made to the other?

Good day Giles

Thank you for your response.

  1. Yes I have a website running on Python Anywhere (I can upgrade to integrate 2 web apps)
  2. Yes a clone of the current website
  3. Thats correct
  4. Yes that's correct

No there is no possibility at this time that the changes will be moved back to the old website. They will be differences in content language and currency. the current one will always remain as it is, changes will only be applied to the second but not from a code perspective, rather the domain pointing and admin dashboard changes on the actual site.

If you want to make changes to the cloned app later, I would suggest copying the code for the current app into a new directory and then point the wsgi file for the new web app at the newly copied code. Then you can make changes to the cloned app without affecting the old one.

Perfect

Thank you so much for the advise and assistance. Much appreciated. Can you kindly direct me on how to copy over the code from current app please. Is there a link with this information as I have not encountered under help.

You can use cp. Like this:

cp -R /home/Alaia02/old_site_directory /home/Alaia02/name_for_new_site_directory

Thank you so much for your assistance.

Kind regards

Can another virtual env be added to the new web app without effecting the older one?

You could use the same venv if the dependencies are identical or you could create a new one under a new name.

Thank you. I have followed the steps suggested previously to clone the app which is now southafrica.maiahair.com and pointed the wsgi file for the new web app at the newly copied code however this does not seem to work. Please advise

Thank you. I have followed the steps suggested previously to clone the app which is now southafrica.maiahair.com and pointed the wsgi file for the new web app at the newly copied code however this does not seem to work. Please advise

What do you mean by "does not work"?

Whenever I reload the app, I get a different error. Either 502:Error loading backend or an inception error. I tried running the wsgi but it says file not found.

Take a look into your error log at /var/log/www.southafrica.maiahair.com.error.log You will find the reason for 502 there.