- 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
- 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
+