Skip to content
This repository has been archived by the owner on Feb 22, 2024. It is now read-only.

Deployment #34

Open
Diaoul opened this issue Nov 26, 2014 · 4 comments
Open

Deployment #34

Diaoul opened this issue Nov 26, 2014 · 4 comments

Comments

@Diaoul
Copy link

Diaoul commented Nov 26, 2014

This is a little out of the topic maybe but you don't speak about deployment. Do you use a fully-fledged setup.py and install it on the server from sdist or do you just git clone?

A sdist seems nicer but I feel like Flask applications don't really fit in them.

Thoughts?

@mattupstate
Copy link
Owner

@Diaoul I like to treat me projects as Python packages and install them with pip. This was you can take advantage of the features available with setuptools. I've even gone so far as to setup devpi to run my own private Python package index.

@Diaoul
Copy link
Author

Diaoul commented Nov 26, 2014

That changes the layout of the project then, doesn't it?

For example, the alembic folder must be moved under the overolt package and to leverage on setup.py test you also need to move the tests package too right?

Do you use the console_scripts entry point in setuptools to run the manage.py from the command line?

@Diaoul
Copy link
Author

Diaoul commented Nov 27, 2014

@mattupstate: sorry for being pushy but I'd like to know how you do it because I think I'm doing it wrong. Thanks 🍰

@mattupstate
Copy link
Owner

Generally, I don't make migrations part of the package because migrating a database isn't always necessary when deploying and sometimes requires maintenance specific downtime and DBA level access control. However, in some cases I have made migrations part of the package and an entry point into Alembic to upgrade the database. There is a certain level of Python zen I appreciate in making the migrations as part of the package. But it isn't always necessary to make the package that "complete". Sometimes its just a matter of taste. Other times a matter of user experience.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants