-
Notifications
You must be signed in to change notification settings - Fork 118
/
Azkfile.js
88 lines (88 loc) · 2.62 KB
/
Azkfile.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
/**
* Documentation: http://docs.azk.io/pt-BR/azkfilejs/
*/
// Adds the systems that shape your system
systems({
school: {
// Dependent systems
depends: ['mysql'],
// More images: http://images.azk.io
image: {"docker": "azukiapp/php-fpm:5.6"},
// Steps to execute before running instances
provision: [
"composer install",
"npm install",
"php artisan migrate",
"php artisan db:seed --class=Fakers"
],
workdir: "/azk/#{manifest.dir}",
shell: "/bin/bash",
wait: 20,
mounts: {
'/azk/#{manifest.dir}': sync("."),
'/azk/#{manifest.dir}/vendor': persistent("./vendor"),
'/azk/#{manifest.dir}/composer.phar': persistent("./composer.phar"),
'/azk/#{manifest.dir}/composer.lock': path("./composer.lock"),
'/azk/#{manifest.dir}/.env.php': path("./.env.php"),
'/azk/#{manifest.dir}/bootstrap/compiled.php': path("./bootstrap/compiled.php"),
'/azk/#{manifest.dir}/node_modules': persistent("./node_modules"),
},
scalable: {"default": 1},
http: {
domains: [ "#{system.name}.#{azk.default_domain}" ]
},
ports: {
// exports global variables
http: "80/tcp",
},
envs: {
// Make sure that the PORT value is the same as the one
// in ports/http below, and that it's also the same
// if you're setting it in a .env file
APP_DIR: "/azk/#{manifest.dir}",
},
},
mysql: {
// More info about mysql image: http://images.azk.io/#/mysql?from=docs-full_example
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: "#{net.port.data}"
data: "3306/tcp",
},
envs: {
// set instances variables
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}"
},
},
phpmyadmin: {
// Dependent systems
depends: ["mysql"],
// More images: http://images.azk.io
image: { docker: "reduto/phpmyadmin" },
wait: {retry: 20, timeout: 1000},
scalable: {default: 1, limit: 1},
http: {
domains: [ "#{system.name}.#{azk.default_domain}" ]
},
ports: {
http: "80/tcp",
},
},
});