From 417eeef43fcf4c37a495016d45357f04a2199819 Mon Sep 17 00:00:00 2001 From: Fangchi Wang Date: Sat, 29 Apr 2023 11:29:34 +0800 Subject: [PATCH] Bind to the data subfolder of the postgres container for FedLCM docker-compose deployment The postgres image has a Volume item pointing to `/var/lib/postgresql/data`. If we don't explicitly bind this path, a volume will be automatically created by docker. And it will be destroyed after `docker-compose down`, causing data loss. To address that, we explicitly use a host folder to bind to this path. Signed-off-by: Fangchi Wang --- docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index be5165f3..0b0d7af0 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -29,7 +29,7 @@ services: postgres: image: postgres:13.3 volumes: - - ./output/data/postgres:/var/lib/postgresql + - ./output/data/postgres:/var/lib/postgresql/data ports: - "5432:5432" restart: always