2
0

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 50ac550666/src/sentry/options/defaults.py (L45-L54)
This commit is contained in:
Burak Yigit Kaya 2019-12-06 03:32:31 +03:00 committed by GitHub
parent 7b10fea284
commit 89e8053c40
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 2 deletions

View File

@ -21,7 +21,7 @@ x-sentry-defaults: &sentry_defaults
environment: environment:
SNUBA: 'http://snuba-api:1218' SNUBA: 'http://snuba-api:1218'
volumes: volumes:
- 'sentry-data:/var/lib/sentry/files' - 'sentry-data:/data'
x-snuba-defaults: &snuba_defaults x-snuba-defaults: &snuba_defaults
<< : *restart_policy << : *restart_policy
depends_on: depends_on:

View File

@ -130,6 +130,10 @@ until $(docker-compose run --rm clickhouse clickhouse-client -h clickhouse --que
done; done;
echo "" 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 cleanup
echo "" echo ""

View File

@ -55,7 +55,9 @@ system.secret-key: '!!changeme!!'
filestore.backend: 'filesystem' filestore.backend: 'filesystem'
filestore.options: 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.backend: 's3'
# filestore.options: # filestore.options: