This is an automated email from the ASF dual-hosted git repository.

roryqi pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/gravitino-playground.git


The following commit(s) were added to refs/heads/main by this push:
     new 247a6b3  Remove restart: always from the postgresql service (#160)
247a6b3 is described below

commit 247a6b32983bf337c8982407e20e88820e9523bb
Author: Mark Hoerth <[email protected]>
AuthorDate: Sun Aug 23 20:43:57 2026 -0700

    Remove restart: always from the postgresql service (#160)
    
    ### What changes were proposed in this pull request?
    
    Remove `restart: always` from the `postgresql` service in
    `docker-compose.yaml`.
    
    ### Why are the changes needed?
    
    `postgresql` is the only service in the playground carrying a restart
    policy. On a host reboot the Docker daemon brings it back while the
    other
    services stay down, leaving the project in a mixed state that
    `playground.sh` cannot start out of: the port preflight reports 15432 in
    use, held by the playground's own container, and exits.
    
    The playground is a foreground demo stack driven by `playground.sh
    start`
    and `stop`. No service in it should survive a host reboot, and one
    service
    behaving differently from the rest is what produces the mixed state.
    
    ### Does this PR introduce _any_ user-facing change?
    
    The PostgreSQL container no longer restarts automatically after a Docker
    daemon restart or host reboot. Bring the playground back up with
    `./playground.sh start`.
    
    The policy is recorded on the container at creation time, so an existing
    container keeps it until recreated. Run `docker update --restart=no
    playground-postgresql`, or a full `./playground.sh down` followed by
    `start`, to clear it on a running environment.
    
    ### How was this patch tested?
    
    On an Ubuntu EC2 host running the full playground:
    
    - Before the change, `playground-postgresql` was created with restart
    policy `always`. After `./playground.sh stop` and a host reboot, it was
      the only container running, with the other eleven stopped.
    - After the change, `down` then `start` brings up all twelve containers
    healthy and `docker inspect` reports the postgresql container's restart
      policy as `no`. After `./playground.sh stop` and a host reboot,
      `docker ps` is empty.
    
    Co-authored-by: Mark Hoerth <[email protected]>
---
 docker-compose.yaml | 1 -
 1 file changed, 1 deletion(-)

diff --git a/docker-compose.yaml b/docker-compose.yaml
index 8329965..d3948d4 100644
--- a/docker-compose.yaml
+++ b/docker-compose.yaml
@@ -115,7 +115,6 @@ services:
   postgresql:
     image: postgres:${POSTGRESQL_IMAGE_TAG}
     container_name: playground-postgresql
-    restart: always
     environment:
       POSTGRES_USER: postgres
       POSTGRES_PASSWORD: postgres

Reply via email to