From 89e8053c4089f2bdc8b8ae5b7c20792fbe824828 Mon Sep 17 00:00:00 2001 From: Burak Yigit Kaya Date: Fri, 6 Dec 2019 03:32:31 +0300 Subject: [PATCH] fix(data): Use `/data` for persisting files and file caches (#295) Moves sentry-data volume to /data mount point and sets all file-based storage settings to /data/files, /data/dsym-cache etc. accordingly. See https://github.com/getsentry/sentry/blob/50ac5506669043dd939dd0e44fe4cfb00377ff1d/src/sentry/options/defaults.py#L45-L54 --- docker-compose.yml | 2 +- install.sh | 4 ++++ sentry/config.example.yml | 4 +++- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index b3e15a7..9cbb331 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -21,7 +21,7 @@ x-sentry-defaults: &sentry_defaults environment: SNUBA: 'http://snuba-api:1218' volumes: - - 'sentry-data:/var/lib/sentry/files' + - 'sentry-data:/data' x-snuba-defaults: &snuba_defaults << : *restart_policy depends_on: diff --git a/install.sh b/install.sh index b602ded..6700db3 100755 --- a/install.sh +++ b/install.sh @@ -130,6 +130,10 @@ until $(docker-compose run --rm clickhouse clickhouse-client -h clickhouse --que done; echo "" +echo "Migrating file storage..." +docker run --rm -it -v sentry-data:/data alpine ash -c \ + "mkdir -p /tmp/files; mv /data/* /tmp/files/; mv /tmp/files /data/files" + cleanup echo "" diff --git a/sentry/config.example.yml b/sentry/config.example.yml index 5cff314..d31cf2e 100644 --- a/sentry/config.example.yml +++ b/sentry/config.example.yml @@ -55,7 +55,9 @@ system.secret-key: '!!changeme!!' filestore.backend: 'filesystem' filestore.options: - location: '/var/lib/sentry/files' + location: '/data/files' +dsym.cache-path: '/data/dsym-cache' +releasefile.cache-path: '/data/releasefile-cache' # filestore.backend: 's3' # filestore.options: