Merge pull request #98 from axilleas/new_location_fix
[discourse_docker.git] / templates / redis.template.yml
CommitLineData
9fb5f2d3
SS
1run:
2 - file:
3 path: /etc/service/redis/run
4 chmod: "+x"
5 contents: |
6 #!/bin/sh
7 exec 2>&1
56e5e6c2 8 exec chpst -u redis -U redis /usr/bin/redis-server /etc/redis/redis.conf
9fb5f2d3
SS
9
10 - replace:
11 filename: "/etc/redis/redis.conf"
12 from: "daemonize yes"
13 to: ""
14 - replace:
15 filename: "/etc/redis/redis.conf"
16 from: /^pidfile.*$/
17 to: ""
18
19 - exec:
20 cmd:
21 - install -d -m 0755 -o redis -g redis /shared/redis_data
22
23 - replace:
24 filename: "/etc/redis/redis.conf"
25 from: /^logfile.*$/
26 to: "logfile \"\""
27
28 - replace:
29 filename: "/etc/redis/redis.conf"
30 from: /^dir .*$/
31 to: "dir /shared/redis_data"
32
33 - exec:
34 cmd: echo redis installed
35 hook: redis
36
37# we can not migrate without redis, launch it if needed
38hooks:
39 before_code:
40 - exec:
41 background: true
e56a65f6 42 cmd: su - redis -s /bin/bash -c '/usr/bin/redis-server /etc/redis/redis.conf'
9fb5f2d3 43 after_code:
9fb5f2d3
SS
44 - replace:
45 filename: /etc/service/unicorn/run
46 from: "# redis"
47 to: sv start redis || exit 1