The Azkfile.js is the backbone of the functioning of azk. Its main function is to describe the application architecture and define where the main directory of the application is located.

It is expected that the Azkfile.js will be included with the application files in your version control. This allows other team members to use azk to control the environment and the applications to run in their own stations.

As suggested by the .js extension the Azkfile.js is written in JavaScript, but no advanced knowledge of JavaScript is needed to edit it. Its logic is really simple and basically describes how azk must provision the environment for running the systems that make up your application.

All properties available for the Azkfile.js and their descriptions can be found in the Reference section.

Full Azkfile.js example

Obs: this is just an example with all the choices available on Azkfile.js, it is not a valid configuration for an application. Use it only as reference.

// Adds the systems that shape your system
  'node-example': {
    // Dependent systems
    depends: ["mysql"],
    // More info about node image:
    image: { docker: "azukiapp/node:0.12" },
    // Steps to execute before running instances
    provision: [
      "npm install",
    workdir: "/azk/#{manifest.dir}",
    command: ["node", "index.js"],
    mounts: {
      // Mounts folders to assigned paths
      "/azk/#{manifest.dir}": path("."),
    // Start with 2 instances
    scalable: { default: 2},
    // Set hostname to use in http balancer
    http: {
      domains: [ "#{}.#{azk.default_domain}" ],
    envs: {
      // Exports global variables
      NODE_ENV: "dev",

  mysql: {
    // More info about mysql image:
    image: {"docker": "azukiapp/mysql:5.7"},
    shell: "/bin/bash",
    wait: 25,
    mounts: {
      '/var/lib/mysql': persistent("mysql_data"),
      // to clean mysql data, run:
      // $ azk shell mysql -c "rm -rf /var/lib/mysql/*"
    ports: {
      // exports global variables: "#{}"
      data: "3306/tcp",
    envs: {
      // set instances variables
      MYSQL_USER         : "azk",
      MYSQL_PASSWORD     : "azk",
      MYSQL_DATABASE     : "#{manifest.dir}_development",
    export_envs: {
      // check this gist to configure your database
      DATABASE_URL: "mysql2://#{envs.MYSQL_USER}:#{envs.MYSQL_PASSWORD}@#{}:#{}/#{envs.MYSQL_DATABASE}",
      // or use splited envs:
      // MYSQL_USER    : "#{envs.MYSQL_USER}",
      // MYSQL_HOST    : "#{}",
      // MYSQL_PORT    : "#{}",

// Sets a default system (to use: start, stop, status, scale)