Hello,

foapapp's Avatar

foapapp

16 Jan, 2012 12:56 PM via web

I got a roll called PHP application and in this role I got two instances.
Each of these instances runs their own application.

I have created two applications with one Github repo for each (two repos in total) when I deploy the first one all went fine but
when I deploy to the second instance the system is using the repo for the first application! The URL to the repo is correct and I have checked the correct instance.

This is driving me crazy. What is wrong?
Is it that I got two instances with two different applications (repos) under the same role?

Thankful for a quick reply!

  1. Support Staff 2 Posted by Jonathan Weiss on 16 Jan, 2012 04:59 PM

    Jonathan Weiss's Avatar

    Are you sure that both applications use the same github repo (you can check on the instance in /srv/www)?

    If you have two applications on one server you will get of course just one when you hit the IP. In order to get the different applications you need use use different DNS names.

  2. 3 Posted by foapapp on 16 Jan, 2012 05:45 PM

    foapapp's Avatar

    I got two different servers (2 instances) and two
    different repos (one for each server).

    I was able to install the first app using the first
    repo but when I tried to install the second application
    using the second repo I got the files from the first rep instead!
    Very strange.

  3. Support Staff 4 Posted by Jonathan Weiss on 16 Jan, 2012 05:57 PM

    Jonathan Weiss's Avatar

    If both servers are in the same cluster, the application will be deployed to both machines.

    All applications in a cluster will be deployed to all machines with the matching role in a cluster. You then need DNS/vhost to distinguish on a server to get to the correct application.

  4. 5 Posted by foapapp on 16 Jan, 2012 06:43 PM

    foapapp's Avatar

    By cluster do you then mean cloud?

    I need to have three instances.

    1. MongoDB only.
    2. A PHP application with frontend (Repo 1).
    3. A PHP application that acts as an API (Repo 2).

    How do you recommend that I distribute them? One cloud for each?

  5. 6 Posted by foapapp on 16 Jan, 2012 07:46 PM

    foapapp's Avatar

    I solved this now buy creating three clouds, one for each app and it works fine now. We are not paying by cloud only instances, right?

  6. Support Staff 7 Posted by Thomas Metschke on 19 Jan, 2012 07:06 PM

    Thomas Metschke's Avatar

    No you are paying by running instance - it doesn't matter how many clouds you have

  7. Thomas Metschke closed this discussion on 19 Jan, 2012 07:06 PM.

Comments are currently closed for this discussion. You can start a new one.