From c91f3744b81c684d86a4151d7fa4eb6b13a35aa9 Mon Sep 17 00:00:00 2001 From: dingzhaojun Date: Tue, 29 Aug 2023 19:51:37 +0800 Subject: [PATCH] docker dev --- compose-dev.yaml | 33 +++++++++++++++++++++++ docker-compose.yml => docker-compose2.yml | 0 2 files changed, 33 insertions(+) create mode 100644 compose-dev.yaml rename docker-compose.yml => docker-compose2.yml (100%) diff --git a/compose-dev.yaml b/compose-dev.yaml new file mode 100644 index 0000000..1003c43 --- /dev/null +++ b/compose-dev.yaml @@ -0,0 +1,33 @@ +services: + app: + entrypoint: + - sleep + - infinity + image: docker/dev-environments-java:stable-1 + container_name: app-01 + init: true + volumes: + - type: bind + source: /var/run/docker.sock + target: /var/run/docker.sock + + postgres: + image: postgres + container_name: postgre-01 + ports: + - "5432:5432" + restart: always + environment: + POSTGRES_USER: postgres + POSTGRES_PASSWORD: "11111111" + POSTGRES_DB: y9_public + PGDATA: "/var/lib/postgresql/data/pgdata" + volumes: + - d:/docker-data/postgres:/var/lib/postgresql/data + healthcheck: + test: ["CMD-SHELL", "pg_isready -U postgres -d y9_public"] + interval: 10s + timeout: 5s + retries: 3 + + diff --git a/docker-compose.yml b/docker-compose2.yml similarity index 100% rename from docker-compose.yml rename to docker-compose2.yml