2023-11-24 14:59:11 +00:00
|
|
|
version: "3"
|
|
|
|
services:
|
|
|
|
postgresql:
|
|
|
|
image: postgres:latest
|
|
|
|
container_name: postgresql
|
|
|
|
restart: unless-stopped
|
|
|
|
environment:
|
|
|
|
POSTGRES_USER:
|
|
|
|
POSTGRES_PASSWORD:
|
|
|
|
POSTGRES_DB:
|
|
|
|
volumes:
|
|
|
|
- <docker directory>/postgresql/data:/var/lib/postgresql/data
|
2024-01-09 21:10:50 +00:00
|
|
|
networks:
|
|
|
|
postgresql:
|
|
|
|
ipv4_address: <static ip>
|
2023-11-24 14:59:11 +00:00
|
|
|
ports:
|
|
|
|
- "5432:5432"
|
|
|
|
pgadmin:
|
|
|
|
container_name: pgadmin
|
|
|
|
image: dpage/pgadmin4:latest
|
|
|
|
restart: unless-stopped
|
|
|
|
environment:
|
|
|
|
PGADMIN_DEFAULT_EMAIL:
|
|
|
|
PGADMIN_DEFAULT_PASSWORD:
|
|
|
|
volumes:
|
|
|
|
- <docker directory>/pgadmin:/var/lib/pgadmin
|
2024-01-09 21:10:50 +00:00
|
|
|
networks:
|
|
|
|
postgresql:
|
|
|
|
ipv4_address: <static ip>
|
2023-11-24 14:59:11 +00:00
|
|
|
ports:
|
2024-01-09 21:10:50 +00:00
|
|
|
- "5050:80"
|
|
|
|
networks:
|
|
|
|
postgresql:
|
|
|
|
name: postgresql
|
|
|
|
ipam:
|
|
|
|
config:
|
|
|
|
- subnet: <subnet>
|