Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 14 Jan 2010 19:41:05 -0300
From:      Fernan Aguero <fernan@iib.unsam.edu.ar>
To:        FW <forkandwait@gmail.com>
Cc:        freebsd-ports@freebsd.org
Subject:   Re: Distributing web-app via ports?
Message-ID:  <20100114224105.GA2723@iib.unsam.edu.ar>
In-Reply-To: <8029763b1001141252l7b6f0608r455788a3c0e487a6@mail.gmail.com>
References:  <8029763b1001141252l7b6f0608r455788a3c0e487a6@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
+----[ 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...)

Hi forkandwait,

| 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:
http://www.mail-archive.com/freebsd-ports@freebsd.org/msg06760.html
 
| 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.
| 
| TIA
|
+----]

Hope this helps,

--
fernan




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20100114224105.GA2723>