Convenient shell things when logging in as impress user in production
Now, if I run `sudo -i -u impress` on the production server, it opens a login bash shell, with all of the app's environment variables exported, straight to `/srv/impress`. This will let me quickly `cd current; bin/rails console` to start poking at whatever needs poked!
This commit is contained in:
parent
d33395fda9
commit
d5abc65dc9
1 changed files with 14 additions and 0 deletions
|
@ -98,7 +98,9 @@
|
|||
user:
|
||||
name: impress
|
||||
comment: Impress App
|
||||
home: /srv/impress
|
||||
create_home: false
|
||||
shell: /bin/bash
|
||||
|
||||
- name: Create "impress-deployers" group
|
||||
group:
|
||||
|
@ -172,6 +174,18 @@
|
|||
mode: "755"
|
||||
state: directory
|
||||
|
||||
- name: Add a convenient .bash_profile for when we log in as "impress"
|
||||
copy:
|
||||
owner: impress
|
||||
group: impress
|
||||
dest: /srv/impress/.bash_profile
|
||||
content: |
|
||||
set -a # Export all of the below
|
||||
RAILS_ENV=production
|
||||
EXECJS_RUNTIME=Disabled
|
||||
source /srv/impress/shared/production.env
|
||||
set +a
|
||||
|
||||
- name: Create the app's "versions" folder
|
||||
become_user: impress
|
||||
file:
|
||||
|
|
Loading…
Reference in a new issue