Created
April 5, 2016 19:41
-
-
Save gullitmiranda/14453f2bf37a09954ffcf9d2d3ae896f to your computer and use it in GitHub Desktop.
Azkfile cakephp with rabbitmq
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
systems({ | |
// coloque este Azkfile no root de cada projeto alterando apenas o nome do sistema | |
// ex: biobanco, apipatinf | |
// obs. não esqueça de também adicionar o Dockerfile no root de cada projeto | |
// obs2. não esquecer de alterar o nome do sistema também no setDefault no final do Azkfile | |
avapng: { | |
depends: ["mysql"], | |
image: { dockerfile: './Dockerfile' }, | |
workdir: '/var/www', | |
shell: '/bin/bash', | |
command: '/usr/local/bin/run', | |
wait: 50, | |
provision: [ | |
"composer install", | |
"./Vendor/bin/cake Migrations.migration run all", | |
], | |
http: { | |
domains: [ "#{system.name}.#{azk.default_domain}" ] | |
}, | |
mounts: { | |
'/var/www' : path('.'), | |
'/var/www/tmp' : persistent('tmp'), | |
'/var/www/Vendor' : persistent('Vendor'), | |
'/var/www/Plugin/CakePdf' : persistent('Plugin/CakePdf'), | |
'/var/www/Plugin/Migrations' : persistent('Plugin/Migrations'), | |
}, | |
scalable: {default: 1}, | |
ports: { | |
fastcgi: '80/tcp', | |
} | |
}, | |
mysql: { | |
image: {"docker": "azukiapp/mysql:5.7"}, | |
shell: "/bin/bash", | |
wait: 100, | |
mounts: { | |
'/var/lib/mysql': persistent("mysql_data"), | |
'/etc/mysql/my.cnf': path('./mysql/my.cnf') | |
}, | |
ports: { | |
data: "3306/tcp", | |
}, | |
envs: { | |
MYSQL_USER: "azk", | |
MYSQL_PASSWORD: "azk", | |
MYSQL_DATABASE: "#{manifest.dir}_development", | |
MYSQL_ROOT_PASSWORD: "azk", | |
}, | |
export_envs: { | |
MYSQL_USER : "#{envs.MYSQL_USER}", | |
MYSQL_PASSWORD: "#{envs.MYSQL_PASSWORD}", | |
MYSQL_HOST : "#{net.host}", | |
MYSQL_PORT : "#{net.port.data}", | |
MYSQL_DATABASE: "#{envs.MYSQL_DATABASE}" | |
}, | |
}, | |
rabbit: { | |
depends: ["rabbit-daemon"], | |
image: {"docker": "rabbitmq:3-management"}, | |
workdir: '/azk/#{manifest.dir}', | |
shell: '/bin/bash', | |
wait: 20, | |
http: { | |
domains: [ "#{system.name}.#{manifest.dir}.#{azk.default_domain}" ] | |
}, | |
ports: { | |
http: "15672/tcp" | |
}, | |
scalable: {default: 1} | |
} | |
"rabbit-daemon": { | |
depends: [], | |
image: {"docker": "rabbitmq:3"}, | |
workdir: '/azk/#{manifest.dir}', | |
shell: '/bin/bash', | |
command: ['rabbitmq-server'], | |
wait: 20, | |
http: { | |
domains: [ "#{system.name}.#{manifest.dir}.#{azk.default_domain}" ] | |
}, | |
mounts: { | |
'/var/lib/rabbitmq': persistent('./rabbitmq-data'), | |
}, | |
ports: { | |
node: "5672/tcp", | |
}, | |
scalable: {default: 1}, | |
export_envs: { | |
RABBITMQ_NODE_IP_ADDRESS: "#{net.host}", | |
RABBITMQ_NODE_PORT : "#{net.port.node}", | |
} | |
}, | |
}); | |
setDefault('avapng'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment