Last active
January 4, 2023 11:21
-
-
Save sshtmc/273e2691b5edc126106c2b14f1f699ff to your computer and use it in GitHub Desktop.
Podman-compose (or docker-compose) config for running Postgresql + PgAdmin4 with data stored in the project subdirectory
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
services: | |
postgresql: | |
image: docker.io/postgres:latest | |
container_name: postgresql | |
restart: unless-stopped | |
ports: | |
- "5432:5432" | |
environment: | |
POSTGRES_USER: admin | |
POSTGRES_PASSWORD: admin | |
volumes: | |
- ./postgresql_data:/var/lib/postgresql/data | |
pgadmin4: | |
image: docker.io/dpage/pgadmin4:latest | |
container_name: pgadmin4 | |
restart: unless-stopped | |
ports: | |
- "5480:80" | |
environment: | |
PGADMIN_DEFAULT_EMAIL: root@localhost | |
PGADMIN_DEFAULT_PASSWORD: admin | |
PGADMIN_SERVER_JSON_FILE: /pgadmin4/pgadmin4-config.json | |
depends_on: postgresql | |
volumes: | |
- ./pgadmin4-config.json:/pgadmin4/pgadmin4-config.json |
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
{ | |
"Servers": { | |
"1": { | |
"Name": "postgresql", | |
"Group": "Servers", | |
"Host": "postgresql", | |
"Port": 5432, | |
"MaintenanceDB": "postgres", | |
"Username": "admin", | |
"Password": "admin", | |
"SSLMode": "prefer", | |
"SSLCert": "<STORAGE_DIR>/.postgresql/postgresql.crt", | |
"SSLKey": "<STORAGE_DIR>/.postgresql/postgresql.key", | |
"SSLCompression": 0, | |
"Timeout": 10, | |
"UseSSHTunnel": 0, | |
"TunnelPort": "22", | |
"TunnelAuthentication": 0 | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment