Added zsrc for devF
This commit is contained in:
parent
7dc2a593c4
commit
1f56c9f4ec
28
zsh/environment/host/devF/zshrc
Normal file
28
zsh/environment/host/devF/zshrc
Normal file
|
@ -0,0 +1,28 @@
|
|||
##### Aliases
|
||||
# Database Connection
|
||||
db_envs=(cadev ildev indev ladev txdev utdev mddev)
|
||||
for env in $db_envs ; do
|
||||
eval "alias psql_$env='psql -d $env -h dev.cpmixkhfrend.us-east-1.rds.amazonaws.com -p 5432 -U ${env}_owner'"
|
||||
if (( $+commands[pgcli] )); then
|
||||
eval "alias pg_${env}='pgcli -d $env -h dev.cpmixkhfrend.us-east-1.rds.amazonaws.com -p 5432 -U ${env}_owner'"
|
||||
fi
|
||||
done
|
||||
|
||||
# List Databases
|
||||
alias psql_l="psql -h dev.cpmixkhfrend.us-east-1.rds.amazonaws.com -p 5432 -U greenfiling -l"
|
||||
# Sign-In as limited super user.
|
||||
alias psql_root="psql -d postgres -h dev.cpmixkhfrend.us-east-1.rds.amazonaws.com -p 5432 -U greenfiling"
|
||||
|
||||
##### Conveniences
|
||||
#############################################################################################################
|
||||
|
||||
export build_dir="/opt/build"
|
||||
export apps_dir="/mount/data0/apps"
|
||||
|
||||
for build_path in $build_dir/^shared ; do
|
||||
# get the env name from the full path.
|
||||
local env_name=$(basename $build_path )
|
||||
eval "export ${env_name}_build=${build_path}"
|
||||
eval "export ${env_name}_app=${apps_dir}/${env_name}"
|
||||
eval "export ${env_name}_logs=${apps_dir}/${env_name}/logs"
|
||||
done
|
Loading…
Reference in New Issue
Block a user