more useful motd message, added shortcut for various tools
authorSam <sam.saffron@gmail.com>
Fri, 21 Mar 2014 05:06:12 +0000 (16:06 +1100)
committerSam <sam.saffron@gmail.com>
Fri, 21 Mar 2014 05:06:12 +0000 (16:06 +1100)
templates/sshd.template.yml
templates/web.template.yml

index c4ca4f6712bea14b2aa844ca5509b9b2c8f59cdb..888e834ca0607b6ed11588dbf3ca0af4d88be2ac 100644 (file)
@@ -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
index 4912d08a82b9ac3c05efc20a806729fb61018168..ee53dde684a77da7d413b2f5ed0e693a0ae0b115 100644 (file)
@@ -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
+