Class: Mobilis::RedisInstance
Instance Method Summary
collapse
#children, #display, #docker_image_name, #env_vars, #generate_build_sh, #git_commit_all, #initialize, #linked_to_rails_project, #links, #name, #options, #parents, #set_links, #type
#append_line, #oblivious_run_command, #run_command, #run_docker, #set_file_contents, #set_second_line, #write_file
Instance Method Details
#child_env_vars ⇒ Object
12
13
14
15
16
17
18
|
# File 'lib/mobilis/redis_instance.rb', line 12
def child_env_vars
[
"REDIS_HOST=#{ name }",
"REDIS_PORT=6379",
"REDIS_PASSWORD=#{ password }"
]
end
|
#data_dir ⇒ Object
20
21
22
|
# File 'lib/mobilis/redis_instance.rb', line 20
def data_dir
"./data/#{ name }"
end
|
#generate ⇒ Object
8
9
10
|
# File 'lib/mobilis/redis_instance.rb', line 8
def generate
FileUtils.mkdir_p data_dir
end
|
#has_local_build ⇒ Object
24
25
26
|
# File 'lib/mobilis/redis_instance.rb', line 24
def has_local_build
false
end
|
#password ⇒ Object
32
33
34
|
# File 'lib/mobilis/redis_instance.rb', line 32
def password
"#{name}_password"
end
|
#username ⇒ Object
28
29
30
|
# File 'lib/mobilis/redis_instance.rb', line 28
def username
name
end
|