#!/bin/bash
APP="$1"
+shift
if [ -z "$APP" ]; then
if [ $(dirname $(pwd)) = "$HOME/workdir" ]; then
fi
fi
-if [ "$APP" != "psql" ]; then
+if [ "$APP" != "psql" -a "$APP" != "pg_restore" ]; then
cd $HOME/workdir/$APP
source ../environment
+elif [ "$APP" = "pg_restore" ]; then
+ source ../environment
+ APP=pg_restore
else
source ../environment
APP=psql
psql -h $POSTGRESQL_ADDON_HOST -p $POSTGRESQL_ADDON_PORT -U $POSTGRESQL_ADDON_USER -d $POSTGRESQL_ADDON_DB
}
+function start_pg_restore() {
+ export PGPASSWORD=$POSTGRESQL_ADDON_PASSWORD
+ pg_restore -h $POSTGRESQL_ADDON_HOST -p $POSTGRESQL_ADDON_PORT -U $POSTGRESQL_ADDON_USER -d $POSTGRESQL_ADDON_DB
+}
+
case "$APP${FLAVOR:+-}$FLAVOR" in
"psql") start_psql;;
+ "pg_restore") start_pg_restore;;
"app") start_app;;
"admin-root") start_stack server;;
+ "admin-user") start_stack server;;
"carrier-directory") start_stack server;;
"freight") start_stack freight-server;;
"notifier") start_stack notifier-exe;;
"notifier-amqp") start_stack notifier-exe-amqp;;
"pricer") start_stack pricer;;
+ "third-parties") start_stack server;;
"toolbox") start_stack toolbox-api;;
esac
FL_APPS_HOST="localhost"
FL_APPS_SCHEME="http"
+FL_ADMIN_USER_PORT=8078
+FL_ADMIN_USER_SECRET="{{ lookup('passwordstore', 'Travail/Fretlink/Macaroons/AdminUser subkey=Secret') }}"
+FL_ADMIN_USER_PRIVATE_KEY="{{ lookup('passwordstore', 'Travail/Fretlink/Macaroons/AdminUser subkey=PrivateKey') }}"
+FL_ADMIN_USER_URL="$FL_APPS_SCHEME://$FL_APPS_HOST:$FL_ADMIN_ROOT_PORT/api/"
+
FL_ADMIN_ROOT_PORT=8079
FL_ADMIN_ROOT_PRIVATE_KEY="{{ lookup('passwordstore', 'Travail/Fretlink/Macaroons/AdminRoot subkey=PrivateKey') }}"
FL_ADMIN_ROOT_URL="$FL_APPS_SCHEME://$FL_APPS_HOST:$FL_ADMIN_ROOT_PORT/api/"
FL_NOTIFIER_PRIVATE_KEY="{{ lookup('passwordstore', 'Travail/Fretlink/Macaroons/Notifier subkey=PrivateKey') }}"
FL_NOTIFIER_URL="$FL_APPS_SCHEME://$FL_APPS_HOST:$FL_NOTIFIER_PORT/api"
+FL_THIRD_PARTIES_PORT=8086
+FL_THIRD_PARTIES_SECRET="{{ lookup('passwordstore', 'Travail/Fretlink/Macaroons/ThirdParties subkey=Secret') }}"
+
FL_PRICER_PORT=8083
FL_PRICER_PRIVATE_KEY="{{ lookup('passwordstore', 'Travail/Fretlink/Macaroons/Pricer subkey=PrivateKey') }}"
+FL_PRICER_SECRET="{{ lookup('passwordstore', 'Travail/Fretlink/Macaroons/Pricer subkey=Secret') }}"
FL_FREIGHT_PORT=8084
FL_FREIGHT_SECRET="{{ lookup('passwordstore', 'Travail/Fretlink/Macaroons/Freight subkey=Secret') }}"
+FL_HOMEPAGE_PORT=8085
+
FL_BOOKKEEPING_SECRET="dummy"
FL_LANE_EXPLORER_SECRET="dummy"
export POSTGRESQL_ADDON_USER="$FL_PSQL_USER"
export POSTGRESQL_ADDON_PASSWORD="$FL_PSQL_PASSWORD"
export POSTGRESQL_ADDON_DB="$name"
+ export PG_URI="postgresql://$POSTGRESQL_ADDON_USER:$POSTGRESQL_ADDON_PASSWORD@localhost:$POSTGRESQL_ADDON_PORT/$POSTGRESQL_ADDON_DB"
else
key=Psql/$(capitalize $FL_ENV)/$(capitalize $APP)
export POSTGRESQL_ADDON_HOST=$(p $key Host)
export POSTGRESQL_ADDON_USER=$(p $key User)
export POSTGRESQL_ADDON_PASSWORD=$(p $key)
export POSTGRESQL_ADDON_DB=$(p $key Database)
+ export PG_URI="postgresql://$POSTGRESQL_ADDON_USER:$POSTGRESQL_ADDON_PASSWORD@$POSTGRESQL_ADDON_HOST:$POSTGRESQL_ADDON_PORT/$POSTGRESQL_ADDON_DB"
fi
+
+ export GRAYLOG_HOST="localhost"
+ export GRAYLOG_PORT="1111"
+ export ENVIRONMENT_NAME="local"
+ export APPLICATION_NAME="$APP"
+ export SENTRY_DSN="test"
+ export ACCEPTED_ORIGINS="*"
fi
if [ "$APP" = "app" ]; then
# carrier directory
export CARRIER_DIRECTORY_URI="$FL_CARRIER_DIRECTORY_URL/"
export FRETLINK_CARDIR_URL="$FL_CARRIER_DIRECTORY_URL"
+ export FRETLINK_CARDIR_URL_FRONTEND="$FL_CARRIER_DIRECTORY_URL"
export FRETLINK_CARDIR_ENABLED="true"
export FRETLINK_CARDIRV3_ACCESS_KEY="$(build_macaroon $FL_CARRIER_DIRECTORY_SECRET carrier-directory carrier-directory carrier-directory::read)"
export FRETLINK_NOTIFIER_AMQP_PORT="{{ lookup('passwordstore', 'Travail/Fretlink/Rabbitmq/Local/Notifier subkey=Port') }}"
export FRETLINK_NOTIFIER_AMQP_VHOST="{{ lookup('passwordstore', 'Travail/Fretlink/Rabbitmq/Local/Notifier subkey=Vhost') }}"
+ # pricer
+ export FRETLINK_PRICER_USE_CARGO_OUTPUT="true"
+ export FRETLINK_PRICER_SHIPPER_PRICE_V2_KEY=$(build_macaroon $FL_PRICER_SECRET pricer pricer pricing::cargo)
+ export FRETLINK_PRICER_SHIPPER_PRICE_KEY=$(build_macaroon --old $FL_PRICER_SECRET pricer pricer internal-cargo-pricing)
+ export FRETLINK_PRICER_CARRIER_SUGGESTION_KEY=$(build_macaroon --old $FL_PRICER_SECRET pricer pricer internal-cargo-pricing)
+ export FRETLINK_PRICER_MACAROON="{{ lookup('passwordstore', 'Travail/Fretlink/Macaroons/PricerDev') }}"
+ export FRETLINK_PRICER_URL="{{ lookup('passwordstore', 'Travail/Fretlink/Macaroons/PricerDev subkey=Url') }}"
# admin-root
export FRETLINK_ADMINROOT_URL=$FL_ADMIN_ROOT_URL
export LANE_EXPLORER_MACAROON_SECRET=$FL_LANE_EXPLORER_SECRET
fi
+if [ "$APP" = "admin-user" ]; then
+ export BASE_URL=$FL_APPS_HOST
+ export API_ROOT="http://$BASE_URL:$PORT/api"
+ export UI_ROOT="http://$BASE_URL:$PORT/admin"
+ export ACCEPTED_ORIGINS="http://$BASE_URL:$PORT/admin"
+ export TOK="$(build_macaroon $FL_ADMIN_USER_PRIVATE_KEY admin-user admin-user admin-user::provisioning)"
+ export ADMIN_TOKEN="$(build_macaroon $FL_ADMIN_USER_SECRET admin-user admin-user admin-user::user-management)"
+ export SERVICE_TOKEN="$(build_macaroon $FL_ADMIN_USER_SECRET admin-user admin-user admin-user::some-service)"
+fi
+
+if [ "$APP" = "homepage" ]; then
+ export HOMEPAGE_API_KEY="{{ lookup('passwordstore', 'Travail/Fretlink/Macaroons/HomepageDev subkey=ApiKey') }}"
+ export HOMEPAGE_API_ROOT_REDIRECT="https://next.www.fretlink.com"
+ export HOMEPAGE_API_BLOG_URL="https://blog.fretlink.com"
+ export HOMEPAGE_API_CIO_API_KEY="123"
+ export HOMEPAGE_API_CIO_SITE_ID="321"
+ fi
+
if [ "$APP" = "carrier-directory" ]; then
export ADMIN_BASE_URL=$FL_APP_URL
export ACCESS_KEY="$(build_macaroon $FL_CARRIER_DIRECTORY_SECRET carrier-directory carrier-directory carrier-directory::read)"
export TEMPLATES_ASSETS_BASE_URL="http://dummy/"
export TRANSPOREON_USER="{{ lookup('passwordstore', 'Travail/Fretlink/Transporeon/ApiTest subkey=Login') }}"
export TRANSPOREON_PASSWORD="{{ lookup('passwordstore', 'Travail/Fretlink/Transporeon/ApiTest') }}"
- export TRANSPOREON_HOST="api.test.transporeon.com"
+ export TRANSPOREON_HOST="{{ lookup('passwordstore', 'Travail/Fretlink/Transporeon/ApiTest subkey=Host') }}"
export TRANSPOREON_CALLBACK_USER="{{ lookup('passwordstore', 'Travail/Fretlink/Transporeon/NotifierCallbackTest subkey=Login') }}"
export TRANSPOREON_CALLBACK_PASSWORD="{{ lookup('passwordstore', 'Travail/Fretlink/Transporeon/NotifierCallbackTest') }}"
#export MACAROON="$(build_macaroon $FL_NOTIFIER_SECRET notifier notifier external)"
# v1
export MACAROON="$(build_macaroon --old $FL_NOTIFIER_PRIVATE_KEY notifier notifier external)"
+ export MONITORING_MACAROON="$(build_macaroon --old $FL_NOTIFIER_PRIVATE_KEY notifier notifier monitoring)"
# To push transporeon cargos to app
export TRANSPOREON_APP_PUSH_URL="http://localhost:8080/api/transporeon/cargo"
export AMQP_TLS="false"
fi
+if [ "$APP" = "third-parties" ]; then
+ export PROCTER_GAMBLE_APP_PUSH_MACAROON="$(build_macaroon $FL_APP_SECRET third-parties app app::proctergamble-cargos-write)"
+ export PROCTER_GAMBLE_APP_PUSH_URL="$FL_APPS_SCHEME://$FL_APPS_HOST:$FL_APP_PORT/api/proctergamble/cargo"
+ export TRANSPOREON_APP_PUSH_MACAROON="$(build_macaroon $FL_APP_SECRET third-parties app app::transporeon-cargos-write)"
+ export TRANSPOREON_APP_PUSH_URL="$FL_APPS_SCHEME://$FL_APPS_HOST:$FL_APP_PORT/api/transporeon/cargo"
+ export PROCTER_GAMBLE_CALLBACK_USER="{{ lookup('passwordstore', 'Travail/Fretlink/ProcterGamble/NotifierCallbackTest subkey=Login') }}"
+ export PROCTER_GAMBLE_CALLBACK_PASSWORD="{{ lookup('passwordstore', 'Travail/Fretlink/ProcterGamble/NotifierCallbackTest') }}"
+ export TRANSPOREON_CALLBACK_USER="{{ lookup('passwordstore', 'Travail/Fretlink/Transporeon/NotifierCallbackTest subkey=Login') }}"
+ export TRANSPOREON_CALLBACK_PASSWORD="{{ lookup('passwordstore', 'Travail/Fretlink/Transporeon/NotifierCallbackTest') }}"
+fi
+
if [ "$APP" = "pricer" ]; then
export GOOGLE_AUTH_CLIENT_ID="dummy"
fi
selchars=-A-Za-z0-9,./?%&#:_
scrollback=1000
bgcolor=rgb(0,0,0)
-fgcolor=rgb(170,170,170)
+fgcolor=rgb(211,215,207)
palette_color_0=rgb(0,0,0)
-palette_color_1=rgb(170,0,0)
-palette_color_2=rgb(0,170,0)
-palette_color_3=rgb(170,85,0)
-palette_color_4=rgb(0,0,170)
-palette_color_5=rgb(170,0,170)
-palette_color_6=rgb(0,170,170)
-palette_color_7=rgb(170,170,170)
-palette_color_8=rgb(85,85,85)
-palette_color_9=rgb(255,85,85)
-palette_color_10=rgb(85,255,85)
-palette_color_11=rgb(255,255,85)
-palette_color_12=rgb(85,85,255)
-palette_color_13=rgb(255,85,255)
-palette_color_14=rgb(85,255,255)
-palette_color_15=rgb(255,255,255)
-color_preset=VGA
+palette_color_1=rgb(205,0,0)
+palette_color_2=rgb(78,154,6)
+palette_color_3=rgb(196,160,0)
+palette_color_4=rgb(52,101,164)
+palette_color_5=rgb(117,80,123)
+palette_color_6=rgb(6,152,154)
+palette_color_7=rgb(211,215,207)
+palette_color_8=rgb(85,87,83)
+palette_color_9=rgb(239,41,41)
+palette_color_10=rgb(138,226,52)
+palette_color_11=rgb(252,233,79)
+palette_color_12=rgb(114,159,207)
+palette_color_13=rgb(173,127,168)
+palette_color_14=rgb(52,226,226)
+palette_color_15=rgb(238,238,236)
+color_preset=Tango
disallowbold=false
cursorblinks=false
cursorunderline=false
</keybind>
<keybind key='XF86AudioRaiseVolume'>
<action name='Execute'>
- <command>bash -c "pamixer --allow-boost -u -i 1; v=$HOME/.cache/dunstify_volume; vol=`pamixer --get-volume`; color=`[ $vol -le 100 ] && echo normal || echo critical`; dunstify -r $(($(cat $v))) -p Volume --hints=int:value:$vol -i ' ' -a Openbox-volume -t 1000 -u $color > $v"</command>
+ <command>bash -c "pamixer --allow-boost -u -i 1; v=$HOME/.cache/dunstify_volume; vol=`pamixer --get-volume`; color=`[ $vol -le 100 ] && echo normal || echo critical`; dunstify -r $(($(head -n1 $v))) -p Volume --hints=int:value:$vol -i ' ' -a Openbox-volume -t 1000 -u $color > $v"</command>
</action>
</keybind>
<keybind key='XF86AudioLowerVolume'>
<action name='Execute'>
- <command>bash -c "pamixer --allow-boost -u -d 1; v=$HOME/.cache/dunstify_volume; vol=`pamixer --get-volume`; color=`[ $vol -le 100 ] && echo normal || echo critical`; dunstify -r $(($(cat $v))) -p Volume --hints=int:value:$vol -i ' ' -a Openbox-volume -t 1000 -u $color > $v"</command>
+ <command>bash -c "pamixer --allow-boost -u -d 1; v=$HOME/.cache/dunstify_volume; vol=`pamixer --get-volume`; color=`[ $vol -le 100 ] && echo normal || echo critical`; dunstify -r $(($(head -n1 $v))) -p Volume --hints=int:value:$vol -i ' ' -a Openbox-volume -t 1000 -u $color > $v"</command>
</action>
</keybind>
<keybind key='XF86AudioMute'>
</menu>
<!-- show the manage desktops section in the client-list-(combined-)menu -->
<applications/>
-</openbox_config>
\ No newline at end of file
+</openbox_config>
autorun=1
[autorun]
-x-content/win32-software=pcmanfm
+x-content/ebook-reader=pcmanfm
x-content/bootable-media=pcmanfm
+x-content/win32-software=pcmanfm
+x-content/audio-player=pcmanfm
[ui]
always_show_tabs=0
PS1+="$green\u@\h$blue \w \$$d "
}
+source /usr/share/fzf/key-bindings.bash
+source /usr/share/fzf/completion.bash
+export FZF_COMPLETION_TRIGGER='#'
+
{% if "nodejs" in features.get(profile, []) %}
source /usr/share/nvm/init-nvm.sh
{% endif %}
Plug 'vimwiki/vimwiki', { 'branch': 'dev' }
Plug 'vim-vdebug/vdebug'
Plug 'tpope/vim-fugitive'
+Plug 'tpope/vim-rhubarb'
+Plug 'shumphrey/fugitive-gitlab.vim'
Plug 'tomlion/vim-solidity'
Plug 'chrisbra/SudoEdit.vim'
Plug 'Chiel92/vim-autoformat'
Plug 'juliosueiras/vim-terraform-completion'
Plug 'sjl/gundo.vim'
Plug 'LnL7/vim-nix'
+Plug 'purescript-contrib/purescript-vim'
+Plug 'vmchale/dhall-vim'
+Plug 'junegunn/fzf'
call plug#end()
map <A-]> :vsp <CR>:exec("tag ".expand("<cword>"))<CR>
let g:ctrlp_extensions = ['tag', 'buffertag', 'dir', 'undo', 'line']
+let g:ctrlp_max_files = 0
set modeline
set grepprg=grep\ -rn\ $*\ /dev/null
set list
set listchars=tab:>-,trail:-
-
Host immae.eu
HostName immae.eu
User immae
+
+Host 443.immae.eu
+HostName 178.33.252.96
+User immae
+Port 443