daily pastebin goal
15%
SHARE
TWEET

Untitled

a guest Mar 25th, 2019 62 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/bin/bash
  2. # usage: curl -sL bit.ly/mlgrm-postgres | EMAIL=mail@example.com [PASSWORD=xxxxxxx] bash
  3.  
  4. [[ -z $PASSWD ]] && PASSWD=$(apg -n 1) && >&2 echo "password: $PASSWD"
  5. [[ -z $EMAIL ]] && >&2 echo "need to set EMAIL" && exit
  6.  
  7. if ! docker network inspect postgres 2> /dev/null; then docker network create postgres; fi
  8. docker run -d \
  9.     -v /var/lib/postgres:/var/lib/postgres \
  10.     --name postgres \
  11.     -h postgres \
  12.     -e POSTGRES_PASSWORD=$PASSWD \
  13.     postgres
  14.    
  15. curl -sL bit.ly/mlgrm-traefiker |
  16.     HOSTNAME=pgadmin \
  17.     bash -s -- run -d \
  18.     --name pgadmin \
  19.     -v /var/lib/pgadmin:/var/lib/pgadmin \
  20.     -e PGADMIN_DEFAULT_EMAIL=$EMAIL \
  21.     -e PGADMIN_DEFAULT_PASSWORD=$PASSWD \
  22.     dpage/pgadmin4
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top