-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathKaiserfile
53 lines (44 loc) · 1.44 KB
/
Kaiserfile
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
args = {}
args['UID'] = Process.uid
dockerfile ".kaiser/Dockerfile", args: args
db "mysql:8.0",
port: 3306,
data_dir: "/var/lib/mysql",
params: "-e MYSQL_ROOT_PASSWORD=test123",
commands: "
--character-set-server=utf8mb4
--collation-server=utf8mb4_unicode_ci",
waitscript_params: "
-e MYSQL_PORT_3306_TCP_ADDR=<%= db_container_name %>
-e MYSQL_PORT_3306_TCP_PORT=3306
-e MYSQL_ENV_MYSQL_ROOT_PASSWORD=test123",
waitscript: <<-SCRIPT
#!/bin/bash
echo "Waiting for mysql to start."
until mysql -h"$MYSQL_PORT_3306_TCP_ADDR" -P"$MYSQL_PORT_3306_TCP_PORT" -uroot -p"$MYSQL_ENV_MYSQL_ROOT_PASSWORD" -e "SELECT 1"
do
printf "."
sleep 1
done
echo -e "\nmysql started."
SCRIPT
app_params "
-e REDIS_URL=redis://<%= @config[:shared_names][:redis] %>:6379
-e DATABASE_URL=mysql2://root:test123@<%= db_container_name %>
-e READONLY_DATABASE_URL=mysql2://root:test123@<%= db_container_name %>
-e REMOTE_CHROME_HOST=<%= @config[:shared_names][:chrome] %>
-e TEST_HOST=<%= app_container_name %>
-e TEST_SERVER=webrick"
attach_mount 'app', '/app/app'
attach_mount 'bin', '/app/bin'
attach_mount 'config', '/app/config'
attach_mount 'db', '/app/db'
attach_mount 'lib', '/app/lib'
attach_mount 'test', '/app/test'
attach_mount 'vendor', '/app/vendor'
attach_mount "Gemfile", "/app/Gemfile"
attach_mount "Gemfile.lock", "/app/Gemfile.lock"
attach_mount "Rakefile", "/app/Rakefile"
type :http
expose "52130"
db_reset_command "bin/setup"