Distributing web-app via ports?
fernan at iib.unsam.edu.ar
Thu Jan 14 23:04:04 UTC 2010
+----[ FW (14.Jan.2010 18:26):
| Hi all,
| (Sorry if this is a stupid question -- I did try to google it but to
| no avail...)
| I am writing a web app in python that depend on postgresql and
| cherrypy and a bunch of scientific libraries, and would like to find
| an easy way to distribute it. Part of what would need to get set up
| automatically during the make phase is a database along with some
| initial table data; this could be interactive as appropriate.
take a look at the ports-mgmt/tinderbox, it might help you
see how others do it.
The port installs the software and then prints a set of
instructions (see the pkg-message file) that guide you in
setting up the apache web server, configuring the app, and
then running a script (provided by the port) that will load
the database schema.
There are other ports that do similar things. www/trac is
one other python web app that comes to mind.
| Currently it is running on our servers but there are some people out
| there who would like to have it locally.
| As a recent BSD convert, I have started to wonder if a ports set up
| would be good. It would make it easy if you are on BSD, and give
| someone a place to start if they are on something else. (And if we
| get a bunch of contracting dollars to set it up for a country I could
| include hardware and installation time as part of the fee.)
| It is a niche application (mortality forecasting), so I am not sure if
| it would be appropriate for the standard BSD tree, but I would happily
| include it. I could also put the ports file (or whatever it is
| called) on my website and have folks grab it there. I could use apt or
| some such, but I don't like/ develop on Linux anymore, and there might
| be some converter thingy.
You can certainly distribute your port from your website,
but if you want to take full advantage of the ports system
you can make your ports 'local' (installed with a 'local-'
prefix), and appear in the INDEX, be managed by portupgrade, etc.
by following this advice:
| The application itself is a form based thing, currently under
| mod_python, but it would be great to use the cherrypy http server and
| have it listen at an arbitrary port without apache needing to be run.
Install an rc script in $PREFIX/etc/rc.d that would
start/stop the server? (if the cherrypy server doesn't
already come with one such script)
| If smart BSD porters could just share their thoughts about this
| approach, I would appreciate it.
Hope this helps,
More information about the freebsd-ports