From c8eecfd6cd081a4aa40b30833fed165f82480f74 Mon Sep 17 00:00:00 2001 From: Lieven Hollevoet Date: Thu, 17 Oct 2024 16:30:27 +0200 Subject: [PATCH] Make the postgres database persistent in the simple example By default the database container in the simple example is not persistent, when recreating the db container the data is the existing container is erased. With this change the database contant is stored in a docker container. --- simple/docker-compose.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/simple/docker-compose.yml b/simple/docker-compose.yml index 0ae7fa8..9294bf6 100644 --- a/simple/docker-compose.yml +++ b/simple/docker-compose.yml @@ -1,4 +1,6 @@ -version: '2' +volumes: + db_data: + services: buildbot: image: buildbot/buildbot-master:master @@ -20,6 +22,8 @@ services: env_file: - db.env image: "postgres:9.4" + volumes: + - db_data:/var/lib/postgresql/data expose: - 5432