30 lines
766 B
YAML
30 lines
766 B
YAML
version: '3.9'
|
|
name: y9-dev-postgres
|
|
services:
|
|
postgresql:
|
|
image: postgres:latest
|
|
container_name: pg01
|
|
restart: always
|
|
extra_hosts:
|
|
- "host.docker.internal:host-gateway"
|
|
networks:
|
|
- y9-share-net
|
|
ports:
|
|
- "5432:5432"
|
|
environment:
|
|
POSTGRES_USER: 'root'
|
|
POSTGRES_PASSWORD: '12345678'
|
|
POSTGRES_DB: 'y9_public'
|
|
volumes:
|
|
- d:/docker-data/postgres:/var/lib/mysql
|
|
- d:/docker-config/postgres-init:/docker-entrypoint-initdb.d
|
|
healthcheck:
|
|
test: [ "CMD", "pg_isready", "-q", "-d", "postgres", "-U", "root" ]
|
|
interval: 5s
|
|
timeout: 10s
|
|
retries: 8
|
|
labels:
|
|
org.springframework.boot.readiness-check.tcp.disable: true
|
|
networks:
|
|
y9-share-net:
|
|
external: true |