Easy moving of environments: deploybot, docker or manual grunt/gulp setup?

Using a straight forward environment setup for a wordpress website, a local AMP stack for development, staging environment for reviewing/signoff and finally a production environment, what would be the best option quickly move the environments?

local (dev) > staging > development

Read More

Different developers should be easily able to simulate the website (with a similar server setup), then committing to git when they’ve finished a feature. (Then a travis kicks in based on the commit which runs testing)

Then it must be easily movable to the staging server so it can be reviewed by the customer to finally be released to production.

Reading Docker’s documentation is meets the requirements, however this seems like a overkill.

Related posts

1 comment

  1. Yes, Docker seems an overkill for what you want, you can do this with Grunt and grunt-ftp-deploy

    Example:
    You can add a task to your grunt file for dev, staging and production.

    Let’s take staging as example.

    'ftp-deploy-staging': {
      build: {
        auth: {
          host: 'server.com',
          port: 21,
          authKey: 'key1'
        },
        src: 'path/to/git/folder',
        dest: '/path/to/staging/folder'
      }
    }
    

    You can add this inside your staging task.

    grunt.registerTask('staging', 'Staging', function() {
        // do staging stuff
        grunt.task.run('do-staging-stuff');
        /**
         * etcetera
         */
    
        // send to FTP 
        grunt.task.run('ftp-deploy-staging');
    });
    

    About Docker:
    Often Docker is used in continuous deployment for complete environments. You can do for example something like this in your Dockerfile.

    ENV HOME /usr/share/
    ENV GITURL github.com/something/something.git
    ENV GITNAME git_name_on_github
    ENV GITBRANCH master
    
    RUN cd ${HOME} && rm ./* && 
        git clone https://${GITACCESSTOKEN}@${GITURL} ${HOME} && 
        /usr/bin/git init && /usr/bin/git pull origin ${GITBRANCH}
    

Comments are closed.