init_postgres.sh 447 B

12345678910111213141516171819202122
  1. #!/usr/bin/env bash
  2. set -x
  3. set -eo pipefail
  4. #if [[ -z "${RESET}" ]]
  5. #then
  6. # docker stop flowy
  7. # docker rm flowy
  8. #fi
  9. if [[ -z "${SKIP_DOCKER}" ]]
  10. then
  11. docker run \
  12. --name="flowy" \
  13. -e POSTGRES_USER=${DB_USER} \
  14. -e POSTGRES_PASSWORD=${DB_PASSWORD} \
  15. -e POSTGRES_DB=${DB_NAME} \
  16. -p "${DB_PORT}":5432 \
  17. -d postgres \
  18. postgres -N 1000
  19. fi
  20. # ^ Increased maximum number of connections for testing purposes