Skip to content

Instantly share code, notes, and snippets.

@agirorn
Created January 24, 2021 21:39
Show Gist options
  • Save agirorn/4e4d5e186471b8218ff7ec257e2e1d4b to your computer and use it in GitHub Desktop.
Save agirorn/4e4d5e186471b8218ff7ec257e2e1d4b to your computer and use it in GitHub Desktop.
Running psql via Docker compose
#!/usr/bin/env bash
docker-compose run /
-e PGPASSWORD=database_password /
docker_compose_host_name /
psql /
-h docker_compose_host_name /
--user database_username /
database_name
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment