Remember me? forgot password | register

SilverStripe Forum

8098 Posts in 2087 Topics by 1161 members

Jump to:

Site Builders

If this is your first visit, you will need to register before you can post. However, you can browse all messages below.

Community » SilverStripe Forum » Site Builders » Running multiple websites using only one Sapphire library
Page: 1 go to end Reply
Author Topic: Running multiple websites using only one Sapphire library 1078 views
  • landzin
    landzin's avatar
    Community Member
    1 post

    Running multiple websites using only one Sapphire library Link to this post

    i have a question about running multiple websites using only one sapphire library. It seems waste of space and inefficient to repeat copying the same code of sapphire library over and over for each website. However, i will keep the site specific folders such as tutorial or mysite and other folders will be kept seperately for each website. Of course, also a different database for each website.

    But I would like to keep only one signle copy of sapphire framework or library. Please shed some lights on me about this issue. Thank you.

    Regards,

    landzin

  • dio5
    avatar
    Community Member
    371 posts
    5 SilverStripe Sites
  • zyko
    avatar
    Community Member
    63 posts

    Re: Running multiple websites using only one Sapphire library Link to this post

    if you have got shell access, you can use hardlinks ...
    but not much of us (so do i) have this :..(

  • saimo
    saimo's avatar
    Community Member
    65 posts
    2 SilverStripe Sites

    Re: Running multiple websites using only one Sapphire library Link to this post

    I think this feels like non-issue. The size of the sapphire library isn't that large (less than 3Mb) compared to the typical account qoutas on webservers. If there is such a need to save space, then maybe it's time to upgrade to a bigger account instead? Or maybe make a second?

    This might be a solution though(haven't tested it):
    * Make a local directory structure on which is the same as the one on your account.
    * In that directory structure, make softlinks to the appropriate folders.
    * Upload using FTP.

    I'm not 100% shure FTP supports softlinks, and the server might not allow it. It might be worth a try though.

  • Sam
    avatar
    Core Development Team
    477 posts

    Re: Running multiple websites using only one Sapphire library Link to this post

    I would recommend using symbolic links for this, on a unix/osx platform.

    You could set up your file system like so:

    /silverstripe
    * /sapphire
    * /cms
    * /jsparty

    /site1
    * /mysite
    * /themes

    /site2
    * /mysite
    * /themes

    And then create symlinks to the sapphire, cms and jsparty directories from within site1 and site2. Here is some shell script that will do that.


    cd site1
    ln -s ../silverstripe/sapphire
    ln -s ../silverstripe/cms
    ln -s ../silverstripe/jsparty
    cd ../site2
    ln -s ../silverstripe/sapphire
    ln -s ../silverstripe/cms
    ln -s ../silverstripe/jsparty

    1078 views
go to top Reply

Currently Online:

There is nobody online.

Welcome to our latest member: dewoob