Created
January 20, 2024 18:28
-
-
Save AlexcastroDev/9aa0413c5f9001d40ff38c821cdd6318 to your computer and use it in GitHub Desktop.
multiple databse yml
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.8' | |
x-postgres-defaults: &postgres-defaults | |
image: postgres:latest | |
environment: | |
POSTGRES_USER: postgres_user | |
POSTGRES_PASSWORD: your_password | |
POSTGRES_DB: your_database | |
volumes: | |
- pgdata:/var/lib/postgresql/data | |
services: | |
postgresql_instance_1: | |
<<: *postgres-defaults | |
ports: | |
- "5432:5432" | |
volumes: | |
- pgdata1:/var/lib/postgresql/data | |
postgresql_instance_2: | |
<<: *postgres-defaults | |
ports: | |
- "5433:5432" | |
volumes: | |
- pgdata2:/var/lib/postgresql/data | |
volumes: | |
pgdata1: | |
pgdata2: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment