Suggested procedure for final deployment of a web-app

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Suggested procedure for final deployment of a web-app

aditya siram-2
I have a web app, my-app, completed and currently located at
http://www.mysite.com/seaside/my-app. I want the website to be the
first thing a user sees when goes to http://www.mysite.com.

The following solution assumes that the user is running a
Seaside-One-Click image version 2.8. I invite feedback from seasoned
Seasiders.

1) ** Remove unnecessary apps from the deployment **
With Seaside running on port 8080, navigate in your web browser to:
http://localhost:8080/seaside/config. Click the the 'Configure' link
next to the 'my-app' entry. Under Configuration, change 'Deployment
Mode' to 'True' and click 'Save'.
Open a workspace and do:
WADispatcher default trimForDeployment.

2) **Password protect the necessary apps**
To obtain a list of applications that Seaside is now serving, open a
workspace and transcript and do:
Transcript show: (WADispatcher default entryPoints).'

This prints something like the following to the Transcript window:
a Dictionary('browse'->a WAApplication named: 'browse' 'comet'->a
WADispatcher named: 'comet' 'config'->a WAApplication named: 'config'
my-app'->a WAApplication named: 'my-app' ... )

It appears that in addition to my-app, Seaside is also serving
applications called 'config' and 'browse'. We don't want a user to be
able to access these so we navigate to the initialize methods of each
of these and change them from:
self registerAsApplication: 'some-name'.
to:
self registerAsAuthenticatedApplication: 'some-name'.

'config' is already protected by default.

In a workspace do:
WADispatcher resetAll.

This prompts you to specify a username and password for every
application you changed in the previous step.

3) **Modify the path to my-app**
Open a workspace and do:
"Change the root directory of all applications. 'eg. 'my-app' is now
available at http://www.mysite.com/my-app, 'config' is available at
http://www.mysite.com/config, similarly with 'browse'"
WADispatcher default setName: ' '.
"Make my-app the default application run by the dispatcher."
WADispatcher default defaultName: 'my-app'.

4) **Change the web server port to 80**
In the default workspace window that comes with the One-Click image change:
WAKom startOn:8080.
to:
WAKom startOn:80.
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Suggested procedure for final deployment of a web-app

Philippe Marschall
2008/6/24 aditya siram <[hidden email]>:

> I have a web app, my-app, completed and currently located at
> http://www.mysite.com/seaside/my-app. I want the website to be the
> first thing a user sees when goes to http://www.mysite.com.
>
> The following solution assumes that the user is running a
> Seaside-One-Click image version 2.8. I invite feedback from seasoned
> Seasiders.
>
> 1) ** Remove unnecessary apps from the deployment **
> With Seaside running on port 8080, navigate in your web browser to:
> http://localhost:8080/seaside/config. Click the the 'Configure' link
> next to the 'my-app' entry. Under Configuration, change 'Deployment
> Mode' to 'True' and click 'Save'.
> Open a workspace and do:
> WADispatcher default trimForDeployment.

This has not been tested in a while, I don't know if it still works.

> 2) **Password protect the necessary apps**
> To obtain a list of applications that Seaside is now serving, open a
> workspace and transcript and do:
> Transcript show: (WADispatcher default entryPoints).'
>
> This prints something like the following to the Transcript window:
> a Dictionary('browse'->a WAApplication named: 'browse' 'comet'->a
> WADispatcher named: 'comet' 'config'->a WAApplication named: 'config'
> my-app'->a WAApplication named: 'my-app' ... )
>
> It appears that in addition to my-app, Seaside is also serving
> applications called 'config' and 'browse'.
>  ...

The best thing is to simply remove all the not needed applications by
hand check only wanted applications are registered.

> 3) **Modify the path to my-app**
> Open a workspace and do:
> "Change the root directory of all applications. 'eg. 'my-app' is now
> available at http://www.mysite.com/my-app, 'config' is available at
> http://www.mysite.com/config, similarly with 'browse'"
> WADispatcher default setName: ' '.
> "Make my-app the default application run by the dispatcher."
> WADispatcher default defaultName: 'my-app'.
>
> 4) **Change the web server port to 80**
> In the default workspace window that comes with the One-Click image change:
> WAKom startOn:8080.
> to:
> WAKom startOn:80.

Not recommended at all. To do this you need root rights. You should
not run any application (including Squeak) with root rights. It's
recommended to use Apache and mod_proxy. Which brings us to point

5) Configure Apache and mod_proxy to serve your static documents
(images, css, javascript) and do the magic for the root URL. Set the
server name, port and path in the configuration of your main
application.

Cheers
Philippe
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside