52 lines
1.1 KiB
YAML
52 lines
1.1 KiB
YAML
name: pg_and_pgadmin
|
|
services:
|
|
pg:
|
|
image: postgres:17.0-bookworm
|
|
container_name: postgres_new
|
|
environment:
|
|
POSTGRES_USER: kolchin
|
|
POSTGRES_PASSWORD: postgres
|
|
PGDATA: /var/lib/postgresql/data/pgdata
|
|
volumes:
|
|
- pg-data:/var/lib/postgresql/data
|
|
- ./db/:/docker-entrypoint-initdb.d
|
|
restart: unless-stopped
|
|
networks:
|
|
- pg-net
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U postgres"]
|
|
interval: 5s
|
|
timeout: 10s
|
|
retries: 3
|
|
pgadmin:
|
|
image: dpage/pgadmin4:8.12.0
|
|
container_name: pgadmin_new
|
|
environment:
|
|
PGADMIN_DEFAULT_EMAIL: user@example.com
|
|
PGADMIN_DEFAULT_PASSWORD: postgres
|
|
ports:
|
|
- 10501:80
|
|
restart: unless-stopped
|
|
networks:
|
|
- pg-net
|
|
depends_on:
|
|
pg:
|
|
condition: service_healthy
|
|
# app:
|
|
# build:
|
|
# context: ./
|
|
# args:
|
|
# PYTHON_VERSION: "3.10"
|
|
# UID: 10002
|
|
# container_name: python-app
|
|
# networks:
|
|
# - pg-net
|
|
# depends_on:
|
|
# pg:
|
|
# condition: service_healthy
|
|
|
|
volumes:
|
|
pg-data:
|
|
networks:
|
|
pg-net:
|