36 lines
801 B
YAML
36 lines
801 B
YAML
services:
|
|
postgres:
|
|
container_name: postgres_container
|
|
image: postgres
|
|
environment:
|
|
POSTGRES_USER: ${POSTGRES_USER:-root}
|
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-123456}
|
|
PGDATA: /data/postgres
|
|
volumes:
|
|
- postgres:/data/postgres
|
|
ports:
|
|
- "5432:5432"
|
|
networks:
|
|
- postgres
|
|
restart: unless-stopped
|
|
|
|
pgadmin:
|
|
container_name: pgadmin_container
|
|
image: dpage/pgadmin4
|
|
environment:
|
|
PGADMIN_DEFAULT_EMAIL: ${PGADMIN_DEFAULT_EMAIL:-root@test.com}
|
|
PGADMIN_DEFAULT_PASSWORD: ${PGADMIN_DEFAULT_PASSWORD:-123456}
|
|
PGADMIN_CONFIG_SERVER_MODE: "False"
|
|
ports:
|
|
- "${PGADMIN_PORT:-8091}:80"
|
|
networks:
|
|
- postgres
|
|
restart: unless-stopped
|
|
|
|
networks:
|
|
postgres:
|
|
driver: bridge
|
|
|
|
volumes:
|
|
postgres:
|