Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 0 additions & 22 deletions docker/docker-compose-3pd-3store-3server.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,11 @@ volumes:
hg-store2-data:

# ── Shared service defaults ──────────────────────────────────────────
# TODO: remove volume mounts below once images are published with new entrypoints
x-pd-common: &pd-common
image: hugegraph/pd:${HUGEGRAPH_VERSION:-latest}
pull_policy: missing
restart: unless-stopped
networks: [hg-net]
Comment on lines 33 to 37
Copy link

Copilot AI Mar 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pull_policy: missing + HUGEGRAPH_VERSION:-latest can keep using a locally cached (older) image instead of pulling the updated one. Since this PR removes the bind-mounted entrypoints/scripts and now relies on the images to contain the new entrypoint logic, using a cached image can lead to startup/config behavior that no longer matches these compose files. Consider switching the compose defaults to pull_policy: always (or pin HUGEGRAPH_VERSION to a known-good tag and document the required minimum image version).

Copilot uses AI. Check for mistakes.
Copy link
Member

@imbajin imbajin Mar 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pull_policy: missing + HUGEGRAPH_VERSION:-latest can keep using a locally cached (older) image instead of pulling the updated one. Since this PR removes the bind-mounted entrypoints/scripts and now relies on the images to contain the new entrypoint logic, using a cached image can lead to startup/config behavior that no longer matches these compose files. Consider switching the compose defaults to pull_policy: always (or pin HUGEGRAPH_VERSION to a known-good tag and document the required minimum image version).

I agree the image update behavior should be explicit, but I don’t think switching this file to pull_policy: always is the right move yet.

Right now these three images do not have stable release tags like 1.7.0, so always pulling latest on every docker compose up would make production deployments pick up potentially breaking changes without an explicit upgrade step. For now, I’d prefer to keep pull_policy: missing and document the manual refresh workflow here instead.

If users want to force a refresh, run: (could refer it in #2963)

docker compose pull pd store server
docker compose up -d pd store server

Once release tags are available for all three images, we can revisit pinning the version and updating the compose defaults accordingly.

entrypoint: ["/hugegraph-pd/docker-entrypoint.sh"]
healthcheck:
test: ["CMD-SHELL", "curl -fsS http://localhost:8620/v1/health >/dev/null || exit 1"]
interval: 15s
Expand All @@ -53,7 +51,6 @@ x-store-common: &store-common
pd0: { condition: service_healthy }
pd1: { condition: service_healthy }
pd2: { condition: service_healthy }
entrypoint: ["/hugegraph-store/docker-entrypoint.sh"]
healthcheck:
test: ["CMD-SHELL", "curl -fsS http://localhost:8520/v1/health >/dev/null || exit 1"]
interval: 15s
Expand All @@ -70,7 +67,6 @@ x-server-common: &server-common
store0: { condition: service_healthy }
store1: { condition: service_healthy }
store2: { condition: service_healthy }
entrypoint: ["/hugegraph-server/docker-entrypoint.sh"]
environment:
STORE_REST: store0:8520
HG_SERVER_BACKEND: hstore
Expand Down Expand Up @@ -103,7 +99,6 @@ services:
ports: ["8620:8620", "8686:8686"]
volumes:
- hg-pd0-data:/hugegraph-pd/pd_data
- ../hugegraph-pd/hg-pd-dist/docker/docker-entrypoint.sh:/hugegraph-pd/docker-entrypoint.sh

pd1:
<<: *pd-common
Expand All @@ -122,7 +117,6 @@ services:
ports: ["8621:8620", "8687:8686"]
volumes:
- hg-pd1-data:/hugegraph-pd/pd_data
- ../hugegraph-pd/hg-pd-dist/docker/docker-entrypoint.sh:/hugegraph-pd/docker-entrypoint.sh

pd2:
<<: *pd-common
Expand All @@ -141,7 +135,6 @@ services:
ports: ["8622:8620", "8688:8686"]
volumes:
- hg-pd2-data:/hugegraph-pd/pd_data
- ../hugegraph-pd/hg-pd-dist/docker/docker-entrypoint.sh:/hugegraph-pd/docker-entrypoint.sh

# --- Store cluster (3 nodes) ---
store0:
Expand All @@ -158,7 +151,6 @@ services:
ports: ["8500:8500", "8510:8510", "8520:8520"]
volumes:
- hg-store0-data:/hugegraph-store/storage
- ../hugegraph-store/hg-store-dist/docker/docker-entrypoint.sh:/hugegraph-store/docker-entrypoint.sh

store1:
<<: *store-common
Expand All @@ -174,7 +166,6 @@ services:
ports: ["8501:8500", "8511:8510", "8521:8520"]
volumes:
- hg-store1-data:/hugegraph-store/storage
- ../hugegraph-store/hg-store-dist/docker/docker-entrypoint.sh:/hugegraph-store/docker-entrypoint.sh

store2:
<<: *store-common
Expand All @@ -190,35 +181,22 @@ services:
ports: ["8502:8500", "8512:8510", "8522:8520"]
volumes:
- hg-store2-data:/hugegraph-store/storage
- ../hugegraph-store/hg-store-dist/docker/docker-entrypoint.sh:/hugegraph-store/docker-entrypoint.sh

# --- Server cluster (3 nodes) ---
server0:
<<: *server-common
container_name: hg-server0
hostname: server0
ports: ["8080:8080"]
volumes:
- ../hugegraph-server/hugegraph-dist/docker/docker-entrypoint.sh:/hugegraph-server/docker-entrypoint.sh
- ../hugegraph-server/hugegraph-dist/src/assembly/static/bin/wait-storage.sh:/hugegraph-server/bin/wait-storage.sh
- ../hugegraph-server/hugegraph-dist/src/assembly/static/bin/wait-partition.sh:/hugegraph-server/bin/wait-partition.sh

server1:
<<: *server-common
container_name: hg-server1
hostname: server1
ports: ["8081:8080"]
volumes:
- ../hugegraph-server/hugegraph-dist/docker/docker-entrypoint.sh:/hugegraph-server/docker-entrypoint.sh
- ../hugegraph-server/hugegraph-dist/src/assembly/static/bin/wait-storage.sh:/hugegraph-server/bin/wait-storage.sh
- ../hugegraph-server/hugegraph-dist/src/assembly/static/bin/wait-partition.sh:/hugegraph-server/bin/wait-partition.sh

server2:
<<: *server-common
container_name: hg-server2
hostname: server2
ports: ["8082:8080"]
volumes:
- ../hugegraph-server/hugegraph-dist/docker/docker-entrypoint.sh:/hugegraph-server/docker-entrypoint.sh
- ../hugegraph-server/hugegraph-dist/src/assembly/static/bin/wait-storage.sh:/hugegraph-server/bin/wait-storage.sh
- ../hugegraph-server/hugegraph-dist/src/assembly/static/bin/wait-partition.sh:/hugegraph-server/bin/wait-partition.sh
29 changes: 0 additions & 29 deletions docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
# TODO: remove volume mounts below once images are published with new entrypoints
name: hugegraph-single

networks:
Expand All @@ -34,9 +33,6 @@ services:
hostname: pd
restart: unless-stopped
networks: [hg-net]

entrypoint: ["/hugegraph-pd/docker-entrypoint.sh"]

environment:
HG_PD_GRPC_HOST: pd
HG_PD_GRPC_PORT: "8686"
Expand All @@ -45,85 +41,60 @@ services:
HG_PD_RAFT_PEERS_LIST: pd:8610
HG_PD_INITIAL_STORE_LIST: store:8500
HG_PD_DATA_PATH: /hugegraph-pd/pd_data

ports:
- "8620:8620"

volumes:
- hg-pd-data:/hugegraph-pd/pd_data
- ../hugegraph-pd/hg-pd-dist/docker/docker-entrypoint.sh:/hugegraph-pd/docker-entrypoint.sh

healthcheck:
test: ["CMD-SHELL", "curl -fsS http://localhost:8620/v1/health >/dev/null || exit 1"]
interval: 10s
timeout: 5s
retries: 12
start_period: 30s


store:
image: hugegraph/store:${HUGEGRAPH_VERSION:-latest}
pull_policy: always
container_name: hg-store
hostname: store
restart: unless-stopped
networks: [hg-net]

entrypoint: ["/hugegraph-store/docker-entrypoint.sh"]

depends_on:
pd:
condition: service_healthy

environment:
HG_STORE_PD_ADDRESS: pd:8686
HG_STORE_GRPC_HOST: store
HG_STORE_GRPC_PORT: "8500"
HG_STORE_REST_PORT: "8520"
HG_STORE_RAFT_ADDRESS: store:8510
HG_STORE_DATA_PATH: /hugegraph-store/storage

ports:
- "8520:8520"

volumes:
- hg-store-data:/hugegraph-store/storage
- ../hugegraph-store/hg-store-dist/docker/docker-entrypoint.sh:/hugegraph-store/docker-entrypoint.sh

healthcheck:
test: ["CMD-SHELL", "curl -fsS http://localhost:8520/v1/health >/dev/null || exit 1"]
interval: 10s
timeout: 10s
retries: 30
start_period: 60s


server:
image: hugegraph/server:${HUGEGRAPH_VERSION:-latest}
pull_policy: always
container_name: hg-server
hostname: server
restart: unless-stopped
networks: [hg-net]

entrypoint: ["/hugegraph-server/docker-entrypoint.sh"]

depends_on:
store:
condition: service_healthy

environment:
HG_SERVER_BACKEND: hstore
HG_SERVER_PD_PEERS: pd:8686

ports:
- "8080:8080"

volumes:
- ../hugegraph-server/hugegraph-dist/docker/docker-entrypoint.sh:/hugegraph-server/docker-entrypoint.sh
- ../hugegraph-server/hugegraph-dist/src/assembly/static/bin/wait-storage.sh:/hugegraph-server/bin/wait-storage.sh
- ../hugegraph-server/hugegraph-dist/src/assembly/static/bin/wait-partition.sh:/hugegraph-server/bin/wait-partition.sh

healthcheck:
test: ["CMD-SHELL", "curl -fsS http://localhost:8080/versions >/dev/null || exit 1"]
interval: 10s
Expand Down
Loading