Created
February 18, 2023 20:53
-
-
Save bit4bit/a5d6bb408e7d724c252ec234c7ed3583 to your computer and use it in GitHub Desktop.
opiniated docker-compose for the Art of PostgreSQL
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
# an opiniated docker-compose for the Art of PostgreSQL | |
# copy this file to docker-compose.yml and then: | |
# 1. copy extra resources to the same file | |
# 2. `docker-compose up` | |
# 3. open http://localhost:9088 with username [email protected] and password admin | |
# 4. add connection to database db.dev using host `db.dev` database name `book` username `book` password `book` | |
# 5. `docker-compose down` | |
version: '3.7' | |
services: | |
db.dev: | |
image: postgres:12 | |
environment: | |
POSTGRES_PASSWORD: book | |
POSTGRES_DB: book | |
POSTGRES_USER: book | |
working_dir: /app | |
volumes: | |
- db:/var/lib/postgresql/data | |
- .:/app | |
pgadmin.dev: | |
image: dpage/pgadmin4 | |
environment: | |
PGADMIN_DEFAULT_PASSWORD: admin | |
PGADMIN_DEFAULT_EMAIL: [email protected] | |
ports: | |
- 9088:80 | |
volumes: | |
- pgadmin:/var/lib/pgadmin | |
volumes: | |
db: | |
pgadmin: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment