FEATURE: change login directory to discourse home when enter a container
authorErick Guan <fantasticfears@gmail.com>
Sat, 19 Mar 2016 09:10:02 +0000 (10:10 +0100)
committerErick Guan <fantasticfears@gmail.com>
Sat, 19 Mar 2016 09:10:02 +0000 (10:10 +0100)
launcher
templates/web.template.yml

index 74feb7e7184782a206af9b5879c9bfcda84e5e91..8f412f9f642f64cc77a514736fdd76b64128c662 100755 (executable)
--- a/launcher
+++ b/launcher
@@ -576,7 +576,7 @@ case "$command" in
       ;;
 
   enter)
-      exec $docker_path exec -it $config /bin/bash
+      exec $docker_path exec -it $config /bin/bash --login
       ;;
 
   ssh)
index 5fbe43495b8c227bb8c092928e15ffeb211dfa46..bfd06ce637d0fc6fd6d6dd28aebbc37c8ff7302d 100644 (file)
@@ -247,3 +247,10 @@ run:
           mkdir -p /shared/backups
           chown -R discourse:www-data /shared/backups
         fi
+
+  # change login directory to Discourse home
+  - file:
+     path: /root/.bash_profile
+     chmod: 644
+     contents: |
+        cd $home