From: Sam Date: Fri, 21 Mar 2014 05:06:12 +0000 (+1100) Subject: more useful motd message, added shortcut for various tools X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=553a4fc9a6c426524cae3634335913becd654d62;p=discourse_docker.git more useful motd message, added shortcut for various tools --- diff --git a/templates/sshd.template.yml b/templates/sshd.template.yml index c4ca4f6..888e834 100644 --- a/templates/sshd.template.yml +++ b/templates/sshd.template.yml @@ -25,3 +25,15 @@ run: - echo "$ssh_key" >> /root/.ssh/authorized_keys - echo "$$ENV_SSH_PUB_KEY" >> /root/.ssh/authorized_keys - chmod 640 /root/.ssh/authorized_keys + - rm /etc/update-motd.d/00-header + - rm /etc/update-motd.d/10-help-text + - rm /etc/update-motd.d/99-footer + - rm /etc/legal + - file: + path: /etc/update-motd.d/00-discourse + chmod: +x + contents: | + #!/bin/sh + echo + echo Welcome to Discourse Docker + echo diff --git a/templates/web.template.yml b/templates/web.template.yml index 4912d08..ee53dde 100644 --- a/templates/web.template.yml +++ b/templates/web.template.yml @@ -130,3 +130,33 @@ run: - sudo -E -u discourse bundle exec rake db:migrate - sudo -E -u discourse bundle exec rake assets:precompile + - file: + path: /usr/local/bin/discourse + chmod: +x + contents: | + #!/bin/bash + (cd /var/www/discourse && RAILS_ENV=production sudo -E -u discourse bundle exec script/discourse "$@") + + - file: + path: /usr/local/bin/rails + chmod: +x + contents: | + #!/bin/bash + (cd /var/www/discourse && RAILS_ENV=production sudo -E -u discourse bundle exec script/rails "$@") + + - file: + path: /usr/local/bin/rake + chmod: +x + contents: | + #!/bin/bash + (cd /var/www/discourse && RAILS_ENV=production sudo -E -u discourse bundle exec bin/rake "$@") + + - file: + path: /etc/update-motd.d/10-web + chmod: +x + contents: | + #!/bin/bash + echo + echo Use: rails, rake or discourse to execute commands in production + echo +