From 905b4298cb37b9b5763bd396c415ffc4713ba637 Mon Sep 17 00:00:00 2001 From: Karol Wypchlo Date: Mon, 14 Dec 2020 17:02:19 +0100 Subject: [PATCH] persist cockroach db on mounted volume --- docker-compose.yml | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 50ee71b1..8ed84f47 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -15,7 +15,6 @@ networks: volumes: webapp: - kratos-sqlite: services: sia: @@ -208,7 +207,7 @@ services: - SQA_OPT_OUT=true volumes: - ./docker/kratos/config:/etc/config/kratos - - kratos-sqlite:/var/lib/sqlite + - ./docker/data/cockroachd/sqlite:/var/lib/sqlite command: -c /etc/config/kratos/kratos.yml migrate sql -e --yes networks: shared: @@ -233,10 +232,8 @@ services: command: serve -c /etc/config/kratos/kratos.yml volumes: - ./docker/kratos/config:/etc/config/kratos - - kratos-sqlite:/var/lib/sqlite - - type: bind - source: ./.kratos.yml - target: /etc/config/kratos/kratos.yml + - ./docker/data/cockroachd/sqlite:/var/lib/sqlite + - ./.kratos.yml:/etc/config/kratos/kratos.yml networks: shared: ipv4_address: 10.10.10.81 @@ -291,7 +288,7 @@ services: container_name: cockroachd command: start --insecure volumes: - - kratos-sqlite:/cockroach/cockroach-data + - ./docker/data/cockroachd/sqlite:/cockroach/cockroach-data expose: - 26257 networks: