Deployment guidelines (php / mysql) for co-location?

I worked for a website development company where we had our local machines, an intermediate server, and several production servers. We worked on macs in perl and used svn to commit scripts and perl scripts for upload to production servers. Now I am working on my own project and would like to find good practices for web development when using shared web hosting and not work from a unix-based environment (with all the magic that I could do with perl / bash scripts / cron jobs etc. )

So my question is asked by my conditions:

  • I use a single standard shared web hosting from an external provider (with ssh access)
  • I work with at least one person and intend to use SVN for version control
  • I am developing php / mysql on Windows (but using linux is an option)

What setup do you offer for testing, deployment, code / data transfer? I have an xampp server installed on my local machine, but was not sure which methods are used to transfer data, etc. Under the windows.

+5
source share
3 answers

I have several personal PHP projects on shared hosting; Here are a few thoughts from what I'm doing on one of them (the one that is the most active, and it needs at least a semi-automatic way to synchronize):

A few words about my setup:

  • SVN; bazaar; (, , )
  • ssh ,
  • Linux ( )

, :

  • , ( , ,...), SVN/bazarr/whatever
  • , Apache/PHP/MySQL ( , )
  • , ; , 2/3 , .

:

  • PHP , SVN- " , " HEAD
    • , PHP script Perl script, ^^
  • script /
  • FTP-.
  • ( script, , ); , (, script, ^^)

:

  • script, .
  • script
  • ssh- , rsync , / .

, :

  • : .
  • , , , :
    • "svn update" ,
    • , rsync ( "" , , )
  • , , , , ; ( ) .


, " Linux", rsync; , -, rsync, windows: http://www.itefix.no/i2/node/10650

.


sidenote, rsync:

rsync --checksum \
    --ignore-times \
    --human-readable \
    --progress \
    --itemize-changes \
    --archive \
    --recursive \
    --update \
    --verbose \
    --executability \
    --delay-updates \
    --compress --skip-compress=gz/zip/z/rpm/deb/iso/bz2/t[gb]z/7z/mp[34]/mov/avi/ogg/jpg/jpeg/png/gif \
    --exclude-from=/SOME_LOCAL_PATH/ignore-rsync.txt \
    /LOCAL_PATH/ \
    USER@HOST:/REMOTE_PATH/

private/public keys mecanism, rsync , .

, , "", , , "--dry-run"

ignore-rsync.txt , :

.svn
cache/cbfeed/*
cache/cbtpl/*
cache/dcstaticcache/*
cache/delicious.cache.html
cache/versions/*

- , .

( ".svn" ... , SVN ^^)


, ...

+10

SVN, SVN, beanstalk, SVN-, .

script - ( beta.mysite.com), script -. , .

, rsync. . RSync ( SSH), .

. .

→ DOS, SSH, mysqldump. Cygwin Windows, . SQL script , -root .

, , - .

+1

- . Capistrano , php. Ruby, , php.

+1

All Articles