From 4469248acd35778a99a58a53220c2b8f88bd4ca4 Mon Sep 17 00:00:00 2001 From: dingzhaojun Date: Thu, 13 Jun 2024 12:19:39 +0800 Subject: [PATCH] add postgres compose file --- compose-postgresql.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 compose-postgresql.yml diff --git a/compose-postgresql.yml b/compose-postgresql.yml new file mode 100644 index 0000000..ddecbe1 --- /dev/null +++ b/compose-postgresql.yml @@ -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 \ No newline at end of file