(Cite Medium article here)
Create the multi-container application:
docker compose --env-file ./config/.env up
Play with the db:
docker exec -it pg_container bash
Login:
- Note the parameters below are examples:
- test_db is whatever the POSTGRES_DB env var is set to in .env.
- root is whatever the user is set to in .env.
psql -h pg_container -d test_db -U root
Remove container
docker rm pg_container
Remove data from backup volumes:
docker-compose down --volumes