These are chat archives for azukiapp/azk

11th
Jun 2015
Wesley Ribeiro
@WesleyRibs
Jun 11 2015 19:01
@gullitmiranda how to add this command: "try_files $uri $uri/ /index.php?$query_string;" on my nginx.conf ? I am using a image of php-fpm.
Gullit Miranda
@gullitmiranda
Jun 11 2015 19:05
@WesleyRibs you can make a mount overriding the current /etc/nginx/sites-available/default inside the container.
eg:
mounts: {
  // ...
  '/etc/nginx/sites-available/default': path('./nginx.conf'),
}
Wesley Ribeiro
@WesleyRibs
Jun 11 2015 19:07
@gullitmiranda thks handsome !!!! you are the guy \o/
Gullit Miranda
@gullitmiranda
Jun 11 2015 19:09
:blush:
@WesleyRibs , I believe this change you will make, may become standard. If you can do as a PR correcting the files:
https://github.com/azukiapp/docker-php-fpm/blob/master/5.5/nginx-default.conf
https://github.com/azukiapp/docker-php-fpm/blob/master/5.6/nginx-default.conf
Slobodan Mišković
@slobo
Jun 11 2015 19:12
What is the best way to cleanup persistent folders and maybe even docker images after i'm done with particular project?
Gullit Miranda
@gullitmiranda
Jun 11 2015 19:15
@slobo, we noted one issue that aims to add functionality to manipulate persistent, such as clean, get (download), list, etc.
To clean the persistent, for now the best alternative is to use the azk shell [system].
Slobodan Mišković
@slobo
Jun 11 2015 19:16
ah, yes good trick.
Gullit Miranda
@gullitmiranda
Jun 11 2015 19:16
To remove images have some cheat sheet. I will translate and put in a gist for you.
Slobodan Mišković
@slobo
Jun 11 2015 19:17
awesome, thanks
Wesley Ribeiro
@WesleyRibs
Jun 11 2015 19:40
@gullitmiranda Snake, I did do what you say, but the following error occurred: azk: Error: HTTP code is 500 which indicates error: server error - file exists at /mnt/sda1/aufs/mnt/71e10ead98bdf61fb24be7374fa5461049eb2783ee78303e1aebbed8042d8db4/etc/nginx/sites-available/default, can't create volume there
Gullit Miranda
@gullitmiranda
Jun 11 2015 19:46

try switching to:

mounts: {
  // ...
  '/etc/nginx/sites-enabled/default': path('./nginx.conf'),
}

or:

mounts: {
  // ...
  '/etc/nginx/sites-enabled/my-nginx': path('./nginx.conf'),
}
Wesley Ribeiro
@WesleyRibs
Jun 11 2015 19:54
Captura de Tela 2015-06-11 às 16.53.57.png
Gullit Miranda
@gullitmiranda
Jun 11 2015 19:55
you used which of the two options?
Wesley Ribeiro
@WesleyRibs
Jun 11 2015 19:56
@gullitmiranda '/etc/nginx/sites-enabled/my-nginx': path('./nginx.conf'), the first option given the same error
Gullit Miranda
@gullitmiranda
Jun 11 2015 20:12
if nginx file is correct I see no reason not to be working. For this attempt to lift it from the shell with the following commands:
$ azk shell
$ /run.sh &
and test output:
curl localhost
Wesley Ribeiro
@WesleyRibs
Jun 11 2015 20:21
@gullitmiranda When run the command /run.sh & showed me this: nginx: [emerg] a duplicate default server for 0.0.0.0:80 in /etc/nginx/sites-enabled/my-nginx:2
[11-Jun-2015 20:19:01] ERROR: An another FPM instance seems to already listen on /var/run/php5-fpm.sock
[11-Jun-2015 20:19:01] ERROR: FPM initialization failed
Gullit Miranda
@gullitmiranda
Jun 11 2015 20:23
then the second option will not work because of default. You can also test with the first?
Wesley Ribeiro
@WesleyRibs
Jun 11 2015 20:25
With the first option: azk: Error: HTTP code is 500 which indicates error: server error - file exists at /mnt/sda1/aufs/mnt/755725432f2e2d7925e3134a75f2d4fcf56a85907172dd4b81d4fc93e6e73ba0/etc/nginx/sites-available/default, can't create volume there
Gullit Miranda
@gullitmiranda
Jun 11 2015 20:26
mounts: {
  // ...
  '/etc/nginx/sites-enabled/default': path('./nginx.conf'),
}
to the above solution I changed the destination folder.I said to overwrite the file that is in site-enabled instead ofsite-available
I will do more detailed tests here
Wesley Ribeiro
@WesleyRibs
Jun 11 2015 20:28
Ok
I put this '/etc/nginx/sites-enabled/default': path('./nginx.conf'), but the error is the same. "azk: Error: HTTP code is 500 which indicates error: server error - file exists at /mnt/sda1/aufs/mnt/755725432f2e2d7925e3134a75f2d4fcf56a85907172dd4b81d4fc93e6e73ba0/etc/nginx/sites-available/default, can't create volume there"
Gullit Miranda
@gullitmiranda
Jun 11 2015 20:41

by my test, aufs the docker does not overwrite files, only folders. therefore the solution that worked for me was:

$ mkdir nginx
$ mv nginx.conf nginx/default.conf

and switching mounts to:

'/etc/nginx/sites-enabled': path('./nginx')
Wesley Ribeiro
@WesleyRibs
Jun 11 2015 20:48
@gullitmiranda YOU ARE THE GUY \o/ SNAKE --> <--- TKS !!!!!!!!! it worked perfectly !!!!!
Gullit Miranda
@gullitmiranda
Jun 11 2015 20:49
:smile: your welcome :joy: :joy: :joy:
Slobodan Mišković
@slobo
Jun 11 2015 21:06
is it a correct assesment that every user on the system needs their own AZK_BALANCER_PORT ? (say I have 4 developers all on the same shared server and they all want to run azk )
Gullit Miranda
@gullitmiranda
Jun 11 2015 21:08
@slobo Everyone wants to run azk on the same machine?
Slobodan Mišković
@slobo
Jun 11 2015 21:10
that was just an example - in practice I have a CI server and my own user both trying to run azk on same machine, so just wondering if above was correct. I'll probably end up letting only ci server run it, or maybe both should sudo to a dedicated user
Gullit Miranda
@gullitmiranda
Jun 11 2015 21:12
As you want to test your applications and not just the azk itself, can raise a single agent.
Slobodan Mišković
@slobo
Jun 11 2015 21:13
from which account should it be done?
Gullit Miranda
@gullitmiranda
Jun 11 2015 21:15
you run the tests in separate accounts?
Slobodan Mišković
@slobo
Jun 11 2015 21:17
say i wanted azk start mysystem from both accounts, yes, how would I run just one azk agent? (i'm more thinking about internal arch of azk for curiosity, i'm already able to do this by setting AZK_BALANCER_PORT to different values for both accounts, just wondering about validity of that approach)
Gullit Miranda
@gullitmiranda
Jun 11 2015 21:21

:joy: :joy:
@fearenales raised this point this week, he is working on azk CI.
The AZK has a concept of namespace, so when you change the namespace all separates, but he said he had trouble just because of conflicting ports.

I believe that in this regard @fearenales is better suited to answer you.

Felipe Arenales Santos
@fearenales
Jun 11 2015 21:31
hey! @slobo, are you using Mac, right?
Slobodan Mišković
@slobo
Jun 11 2015 21:32
on my desktop, yes, the above question was about Linux actually
(don't need multiple azk on my mac :)
Felipe Arenales Santos
@fearenales
Jun 11 2015 21:35
give me one minute!
Slobodan Mišković
@slobo
Jun 11 2015 21:36
i give you two :)
Slobodan Mišković
@slobo
Jun 11 2015 22:15
We touched on this before, but not sure to conclusion. When I do azk start and some systems already started, status code returned is not 0, even though it was able to bring all other systems running.
In a sense, I tell it "ensure all systems started", and it tells me "ERROR: some were already running!"
Felipe Arenales Santos
@fearenales
Jun 11 2015 22:20
haha you're right @slobo . I think $? should be 0... would you mind to open an issue for this?
About your previous question, if you are running at most one azk agent per user, you can use the solution you proposed: set an AZK_BALANCER_PORT for each user and that's fine
Slobodan Mišković
@slobo
Jun 11 2015 22:35
created #448.
Now, I found a bug with azk restart - if system is not started it does this:
$ azk restart drupal; echo $?
azk: System `drupal` not running
azk: System `drupal` already started
...
3
I'll open another ticket
Slobodan Mišković
@slobo
Jun 11 2015 22:45
#449 also on there for your consideration
Felipe Arenales Santos
@fearenales
Jun 11 2015 22:51
thank you very much for your support and contribution, @slobo !