add postgres compose file
This commit is contained in:
parent
c2b1ae92db
commit
4469248acd
|
@ -0,0 +1,30 @@
|
||||||
|
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
|
Loading…
Reference in New Issue