Assign PostgreSQL its own network and static ip
This commit is contained in:
parent
3ba247dedc
commit
5817e697b7
@ -10,6 +10,9 @@ services:
|
|||||||
POSTGRES_DB:
|
POSTGRES_DB:
|
||||||
volumes:
|
volumes:
|
||||||
- <docker directory>/postgresql/data:/var/lib/postgresql/data
|
- <docker directory>/postgresql/data:/var/lib/postgresql/data
|
||||||
|
networks:
|
||||||
|
postgresql:
|
||||||
|
ipv4_address: <static ip>
|
||||||
ports:
|
ports:
|
||||||
- "5432:5432"
|
- "5432:5432"
|
||||||
pgadmin:
|
pgadmin:
|
||||||
@ -21,5 +24,14 @@ services:
|
|||||||
PGADMIN_DEFAULT_PASSWORD:
|
PGADMIN_DEFAULT_PASSWORD:
|
||||||
volumes:
|
volumes:
|
||||||
- <docker directory>/pgadmin:/var/lib/pgadmin
|
- <docker directory>/pgadmin:/var/lib/pgadmin
|
||||||
|
networks:
|
||||||
|
postgresql:
|
||||||
|
ipv4_address: <static ip>
|
||||||
ports:
|
ports:
|
||||||
- "5050:80"
|
- "5050:80"
|
||||||
|
networks:
|
||||||
|
postgresql:
|
||||||
|
name: postgresql
|
||||||
|
ipam:
|
||||||
|
config:
|
||||||
|
- subnet: <subnet>
|
Loading…
Reference in New Issue
Block a user