Created
February 6, 2019 16:07
-
-
Save laurazenc/1e7cdecc95ce8e195b31c77ea67fe273 to your computer and use it in GitHub Desktop.
Docker PostgresSQL
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Access bash from postgres container | |
docker exec -it <DOCKERCONTAINER_NAME> bash | |
// Access with defined user in docker-compose.yaml | |
psql -U postgres |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: "3.1" | |
services: | |
db: | |
image: postgres:alpine | |
restart: always | |
environment: | |
POSTGRES_PASSWORD: postgres | |
POSTGRES_USER: postgres | |
ports: | |
- 5432:5432 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment