Project

General

Profile

Howto deploy on shared hosting

Added by ruben caro over 14 years ago

I can build my own wt apps and run them locally on Linux, the non-fcgi mode.

My question is how can I deploy this app to a shared hosting?

And this question then breaks into several different questions:

I suppose they don't have all the libs I linked dynamically (wt and boost for sure), so should I link statically? How? There are so many deps...

Other way to get it could be copy those .so libs (deployed with the app) and get it to work with system libraries on the server. Is that possible?

Thanks.


Replies (5)

RE: Howto deploy on shared hosting - Added by Massimo Rossello over 14 years ago

This is of interest to me too.

Configuring SHARED_LIBS=OFF you can compile static Wt libraries and link them statically. The issue is still there for other external libraries such as GraphicsMagic

RE: Howto deploy on shared hosting - Added by Koen Deforche over 14 years ago

Hey,

I am actually surprised that shared hosting providers allow you to run binaries that you provide yourself ?

You could build Wt using only those external libraries that you actually need (e.g. only boost). You can also build boost using static libraries to make a complete static build of Wt + your app + dependencies.

Regards,

koen

RE: Howto deploy on shared hosting - Added by Massimo Rossello over 14 years ago

This is actually useful also for not-so-dumb embedded environments, where for example some advanced graphics features would be welcome (e.g. controller displays).

Whenever Wt is required to be linked statically, any other lib could.

What is the clean way to have boost linked statically, anyway?

RE: Howto deploy on shared hosting - Added by Wim Dumon over 14 years ago

Massimo Rossello wrote:

This is actually useful also for not-so-dumb embedded environments, where for example some advanced graphics features would be welcome (e.g. controller displays).

Whenever Wt is required to be linked statically, any other lib could.

What is the clean way to have boost linked statically, anyway?

See /usr/share/cmake-2.8/Modules/FindBoost.cmake:

set(Boost_USE_STATIC_LIBS ON)

On windows, make sure you set BOOST_DYNAMIC to ON (Boost_USE_STATIC_LIBS finds the libs, but on windows this is mostly ignored because we use boost's auto linking, which listens to Wt's BOOST_DYNAMIC option)

Wt by default links to everything it finds. You can disable this by defining the proper cmake symbols (run ccmake or cmake-gui to set them in an interactive way, or -DFOO=ON/OFF from the cmake command line):

I might have missed a couple of them, but with these parameters, you should be able to build a Wt that only depends on boost (of course, with every library you eliminate, you eliminate the associated features from Wt):

ENABLE_GM=OFF (WRasterImage)

ENABLE_HARU=OFF (WPfdImage)

ENABLE_EXT=OFF (not really a library, but saves build time)

ENABLE_SQLITE=OFF (Dbo)

ENABLE_POSTGRES=OFF (Dbo)

CONNECTOR_FCGI=OFF (fcgi connector)

HTTP_WITH_SSL=OFF (https in the http connector)

HTTP_WITH_ZLIB=OFF (compression in the http connector)

How to link statically to these dependencies is a bit out of the scope of Wt. My advice is to build/install the static libs and then edit CMakeCache.txt and write the full path to the .a files in the appropriate places. You may need to add extra libraries when you do this.

BR,

Wim.

RE: Howto deploy on shared hosting - Added by Massimo Rossello over 14 years ago

Thanks a lot

BR,

Massimo

    (1-5/5)