Use ICEcoder on your dev server to code anywhere

  • Hi Guys,


    ICEcoder is awesome if you're looking for something to work on the same environment as a live server on the fly :) You can then use a script to migrate your files and databases. I prefer to run a backup and then sync the backup files and run a restore, this only takes a couple of minutes to run when I make my changes live.


    You get the same environment as a live server, a hosted IDE, no need to download and sync all your files via netbeans etc on all your machines everytime, quick and easy setup.


    DO NOT RUN THIS ON A LIVE SERVER!


    Link this script in your crontab @reboot. The mkdir commands will fail during subsequent runs, it does not matter.
    It adds write permissions for your ICEcoder user.
    You need to create a new customer called ice.YOURDOMAIN.TLD and update this script.
    You need to change the setfacl line to use the correct user for your ice customer.
    You need to copy the ICEcoder software into your htdocs directory (duh).


    #!/bin/sh
    #
    # Loop customer folders and mount
    #
    cd /var/www/virtual
    mkdir ice.YOURDOMAIN.TLD/htdocs/Projects


    for dir in *; do
    if [ -d $dir ] ; then
    if [ $dir = "ice.YOURDOMAIN.TLD" ] ; then
    #
    echo "Skip mounting ice"
    #
    else
    echo "Mount $dir in ice.YOURDOMAIN.TLD/htdocs/Projects"
    mkdir /var/www/virtual/ice.YOURDOMAIN.TLD/htdocs/Projects/$dir
    sudo mount -o bind /var/www/virtual/$dir /var/www/virtual/ice.YOURDOMAIN.TLD/htdocs/Projects/$dir
    chattr -i /var/www/virtual/*
    setfacl -R -m u:vu2XXX:rwx /var/www/virtual/*
    fi
    fi
    done

    Edited once, last by o-leary ().