Forums

1 web-app, 1 git?

So I have 1 Python mini-app that runs on PyAny and it's working just fine.

I was thinking off adding another, totally different script to run on here as well. But as it stands now, I'll have to upgrade at least to the second-tier to be able to do that. The reason being: On my computer, these two mini-projects have different folders, and different git repos. If I simply add the script to PyAny and commit, and then pull on my machine, then I will have duplicates everywhere.

So, is there any way to run two projects, with two different git repos, on the same "server"?

No, that's a limitation of free accounts. You're welcome to sign up for a second account though!

I don't mind paying but just so I understand the concept: 1 web-app, 1 repo? So even the $5/m plan won't help here right?

Well, there's no limit to the amount of git repositories you have on pythonanywhere, or on your own machine. the only limit is on the number of web apps (domains) you can host on pythonanywhere...

I'm sorry but I still don't understand.

Well, there's no limit to the amount of git repositories you have on pythonanywhere, or on your own machine.

That I know. I mention that's exactly my issue in the OP.

My question is very basic: Per 1 web-app, I can have 1 repo, right?

Or, phrase differently: Can I have more than 1 git repo in 1 web-app?

That's all I'm asking.

Well, traditionally you would usually have your web app code in a single repository. But I could imagine structuring your code in such a way that half of it is in one repo, and half in another. But on pythonanywhere, they would still have to be served via 1 web app, 1 wsgi application, 1 wsgi config file. So that would probably be hard to configure?

Well, traditionally you would usually have your web app code in a single repository. But I could imagine structuring your code in such a way that half of it is in one repo, and half in another

Any idea on how that might be achieved?

None of the "apps" are actual apps with a UI, only scripts.

how do you run these scripts?

Through the schedule tab I run main.py. The same would be with the second "app" (which is another set of scripts that serve a different purpose)

ah. from the title of your post I assumed they were being run via a webapp.

in any case, a similar limitation applies to scheduled tasks. free users are only allowed one, paying users have many...

That I understand. But say I pay for the first tier, how would I got about splitting it into two repos?

mind you, you could use the schedule tab to run two different processes, by changing the command from, eg

python3.6 /home/myusername/project1/script1.py

to

python3.6 /home/myusername/project1/script1.py && python3.6 /home/myusername/project2/script2.py

and the project1 and project2 folders can be separate git repositories...

Thanks for your help Harry. I've successfully moved my git repo to a subfolder in the root folder of my account.