2

Basically what I'm trying to do is to create a simple multi-node env with varnish+nginx+mariadb+memcached. By now I've managed to launch the environment and attach git project to it. The problem is that we work with php and symfony2, which requires composer to be executed at least once in order to properly deploy the application.

Outside of jelastic we use Jenkins + Ant (but we don't scale horizontally in automatic on the projects where this setup is used, so it's not a problem to add node manually).

So the question is: How can I run composer or ant with build.xml on each deploy?

I see that Java environments have a build server option, is there something like this for php environments?

Jason Aller
  • 3,541
  • 28
  • 38
  • 38
abrasco83
  • 27
  • 5

1 Answers1

2

PHP projects do not have a "standard" build server in the way that many Java projects do - requirements for PHP build tools are more varied depending on the particular project.

For example one customer may ask for grunt, another for ant, and another for phing.

If you want to perform a sophisticated build, you can create your own build node for your PHP project using an Elastic VPS or separate Docker environment. To deploy the built project to your servers you can use SSH connections, or simply git push and set the runtime environment to auto-update (e.g. via ZDT feature) from that git repo / branch.

If your needs are more simple, you can install composer directly onto your php runtime node in the normal way via SSH.

E.g.

$ curl -sS https://getcomposer.org/installer | php

There are more detailed tips about how to tidy that up (add to your PATH etc.) at http://kb.layershift.com/jelastic-install-composer

Damien - Layershift
  • 1,508
  • 8
  • 15