These are chat archives for azukiapp/azk

16th
May 2015
Junio Vitorino
@juniovitorino
May 16 2015 22:10 UTC
Hi folks, I'm starting with azk and I'd like use it for WordPress development
Someone had this experience already?
Junio Vitorino
@juniovitorino
May 16 2015 22:17 UTC
:-1:
Gullit Miranda
@gullitmiranda
May 16 2015 22:19 UTC
Hello @juniovitorino .
I learned that this has happened. More particularly I have not used yet.
I believe it's not a problem. You need some help?
Junio Vitorino
@juniovitorino
May 16 2015 22:20 UTC
HI @gullitmiranda thanks for reply
Well, I'd like some tips at least.
for WordPress just PHP and MySQL are needed
ask seems setup well this systems, but when I start de azk the mysql not run
and the the domain return only No input file specified
This makes me think that some setup into azkfile could be wrong or missing.
Gullit Miranda
@gullitmiranda
May 16 2015 22:23 UTC
You could send me your Azkfile.js?
Junio Vitorino
@juniovitorino
May 16 2015 22:25 UTC
Oh yeah, sure. Just a minute.
systems({
  wpbase: {
    depends: [],
    image: {"docker": "azukiapp/php-fpm"},
    workdir: "/azk/#{manifest.dir}",
    shell: "/bin/bash",
    wait: {"retry": 20, "timeout": 1000},
    mounts: {
      '/azk/#{manifest.dir}': path("."),
    },
    scalable: {"default": 2},
    http: {
      domains: [ "#{system.name}.#{azk.default_domain}" ]
    },
    ports: {
      http: "80/tcp",
    },
    envs: {
      APP_DIR: "/azk/#{manifest.dir}",
    },
    docker_extra: {
      // extra docker options
      start: {
        Privileged: "true",
      },
    },
  },
  mysql: {
    image: {"docker": "mysql"},
    export_envs: {
      "DB_HOST" : "#{net.host}"
    },
  },
});
Gullit Miranda
@gullitmiranda
May 16 2015 22:29 UTC
I see the mysql is not configured with the necessary
Junio Vitorino
@juniovitorino
May 16 2015 22:30 UTC
Oh good, let's go for the first tip I guess.
Where I can learn how setup the systems for azk?
Gullit Miranda
@gullitmiranda
May 16 2015 22:31 UTC
If you look in the session "Environment Variables" image documentation'll see it there are some things more.
No problem!
I'm here to help it :smiley:
Junio Vitorino
@juniovitorino
May 16 2015 22:33 UTC
Hummm, the job should be made by docker.
Gullit Miranda
@gullitmiranda
May 16 2015 22:34 UTC
For starters, I recommend you use the images held by Azuki as they are properly prepared to work with azk and also has instructions and example of using.
Junio Vitorino
@juniovitorino
May 16 2015 22:34 UTC
I'm totally newbie with this, I'm researching and learning for help my team in the company.
Great, great...
Thank you. :clap:
Gullit Miranda
@gullitmiranda
May 16 2015 22:36 UTC
Very good, the intention of azk is to facilitate this very reason, the idea is that the more the AZK evolve less you will need to know what's going on underneath, like docker.
Junio Vitorino
@juniovitorino
May 16 2015 22:38 UTC
:+1:
I'm very excited with azk and I hope could contribute for it soon.
Gullit Miranda
@gullitmiranda
May 16 2015 22:41 UTC
Every contribution is welcome. There are many ways you can do this.
This morning I've seen you said a blog post from one of the team members. I was very happy about it = D
The contribution is essential for the evolution of azk =D
Junio Vitorino
@juniovitorino
May 16 2015 22:45 UTC
Yes, I'm looking for a good solution to a long time, I tried Vagrant and Docker (Kitematic) before but my team and I not liked so much. I work for a digital company the things should be setup the fastest possible.
We have some boilerplates for the WordPress development and how it's the core of the most of applications, then I guess that azk will fits as a glove for our needs. :smile:
Gullit Miranda
@gullitmiranda
May 16 2015 22:48 UTC
Very good. I hope azk can meet their needs.
With the image that passed you, it works?
Junio Vitorino
@juniovitorino
May 16 2015 22:57 UTC
I'm trying right now, I totally rewrite the azkfile for a php with apache and the mysql. :D
Gullit Miranda
@gullitmiranda
May 16 2015 22:57 UTC
nice
Junio Vitorino
@juniovitorino
May 16 2015 22:58 UTC
It's downloading the imagens at this time.
oh yeah, I'm loving. <3
:smile:
How I could see why a service failed?
Gullit Miranda
@gullitmiranda
May 16 2015 23:04 UTC
We are improving the verbose mode. For now the best way out would be accessing through a azk shell.
You could put the error message?
Junio Vitorino
@juniovitorino
May 16 2015 23:06 UTC
I not started in verbose mode, let me do that.
I stop and start again and just works. -
Gullit Miranda
@gullitmiranda
May 16 2015 23:08 UTC
Strange. But was able to access the application in the browser now?
Junio Vitorino
@juniovitorino
May 16 2015 23:17 UTC
Only mysql, apache not. :(
Gullit Miranda
@gullitmiranda
May 16 2015 23:18 UTC
You can put your new Azkfile.js in a gist?
Junio Vitorino
@juniovitorino
May 16 2015 23:19 UTC
yep
Gullit Miranda
@gullitmiranda
May 16 2015 23:23 UTC
Sorry, one need instruction was removed from the sample Azkfile.js.
Junio Vitorino
@juniovitorino
May 16 2015 23:23 UTC
It's running but isn't accessible using the browser.
Gullit Miranda
@gullitmiranda
May 16 2015 23:23 UTC
add in line #21:
      APP_DIR: "/azk/#{manifest.dir}",
Junio Vitorino
@juniovitorino
May 16 2015 23:23 UTC
What?
Gullit Miranda
@gullitmiranda
May 16 2015 23:24 UTC
whith then envs;
Junio Vitorino
@juniovitorino
May 16 2015 23:25 UTC
I copied from images azuki sample. :|
Gullit Miranda
@gullitmiranda
May 16 2015 23:27 UTC
Yes. My mistake.
I changed the README.md but did not commit :cry:
sorry
Junio Vitorino
@juniovitorino
May 16 2015 23:29 UTC
Hahaha happens..
Ok, no problem
Keep not working, I thing the tunnelling isn't working very well.
Gullit Miranda
@gullitmiranda
May 16 2015 23:29 UTC
Updated now.
Junio Vitorino
@juniovitorino
May 16 2015 23:30 UTC
Seems that the request isn't reaching the server.
:+1:
Gullit Miranda
@gullitmiranda
May 16 2015 23:31 UTC
You can send me the output from the start?
Junio Vitorino
@juniovitorino
May 16 2015 23:31 UTC
yes
Gullit Miranda
@gullitmiranda
May 16 2015 23:36 UTC
Now I noticed that you changed the domain. The domain '.devis invalid because by default the AZK raises loadbalancer and resolving nameservers for the domain* .dev.azk.io`.
Junio Vitorino
@juniovitorino
May 16 2015 23:36 UTC
ohhhh, sorry.
Gullit Miranda
@gullitmiranda
May 16 2015 23:37 UTC
So much so that if you access your application without the loadbalancer it will load:
http://dev.azk.io:49173
Junio Vitorino
@juniovitorino
May 16 2015 23:40 UTC
Oh yeah, works. :+1:
I can't change the domain?
Gullit Miranda
@gullitmiranda
May 16 2015 23:40 UTC
fine
Gullit Miranda
@gullitmiranda
May 16 2015 23:47 UTC
You can even power. However it is not recommended, because the libnssresolver has some limitations.
For example, the domain *.azk.dev (which is what we used before) is not a valid domain, therefore browsers could even break in linux.
Junio Vitorino
@juniovitorino
May 16 2015 23:50 UTC
Ok, ok
It's fine, no problem.
Let me ask you more one thing, how I could pass the envvars to vhost created?
Gullit Miranda
@gullitmiranda
May 16 2015 23:51 UTC
:smile:
What envvars, for example?
Junio Vitorino
@juniovitorino
May 16 2015 23:54 UTC
DB_NAME, DB_HOST, DB_USER, DB_PASS
My database config file seeks for this variables to auto set up.
```php
define('DB_NAME',     getenv('DB_NAME'));
define('DB_USER',     getenv('DB_USER'));
define('DB_PASSWORD', getenv('DB_PASS'));
define('DB_HOST',     getenv('DB_HOST'));
Gullit Miranda
@gullitmiranda
May 16 2015 23:57 UTC

For the purposes of environment variables you can use ` envs or file .env. To export an environment variable between systems you can use theexport_envs`.

http://docs.azk.io/en/reference/azkfilejs/export_envs.html#export_envs

Junio Vitorino
@juniovitorino
May 16 2015 23:59 UTC
Yes, I did this, but the PHP have only access to envvars present on host.
*vhost
look