-
-
Save inthecloud247/6bff618fc3bb3877a55e to your computer and use it in GitHub Desktop.
This file contains hidden or 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
# Setup the application's runit directory | |
/etc/sv/application: | |
file.directory: | |
- mode: 0755 | |
- user: someuser | |
- group: someuser | |
- recurse: | |
- user | |
- group | |
- mode | |
# Create the application's runit run script | |
/etc/sv/application/run: | |
file.managed: | |
- name: /etc/sv/application/run | |
- template: jinja | |
- user: someuser | |
- group: someuser | |
- source: salt://unicorn/templates/sv-unicorn-run.jinja | |
- context: | |
unicorn_command: unicorn_rails | |
unicorn_environment: vagrant | |
# Create the application's runit log run script | |
/etc/sv/application/log/run: | |
file.managed: | |
- name: /etc/sv/application/log/run | |
- user: someuser | |
- group: someuser | |
- source: salt://runit/templates/sv-log-run | |
# Create the log directory | |
/etc/sv/application/log/main: | |
file.directory: | |
- user: someuser | |
- group: someuser | |
- makedirs: True | |
# Create the supervise directory | |
/etc/sv/application/supervise: | |
file.directory: | |
- mode: 0755 | |
- user: someuser | |
- group: someuser | |
- makedirs: True | |
- recurse: | |
- user | |
- group | |
- mode | |
# Link the /etc/service/application to kickoff | |
# runit to start managing the application | |
/etc/service/application: | |
file.symlink: | |
- target: /etc/sv/application |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment