Skip to content

Commit a586e35

Browse files
Merge pull request #183 from anyproto/180-make-cleanetcstorage-does-not-clear-custom-storage-location
fix: respect custom STORAGE_DIR in cleanEtcStorage and tighten volume…
2 parents d26806e + d61e378 commit a586e35

2 files changed

Lines changed: 9 additions & 3 deletions

File tree

Makefile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,5 +49,8 @@ restart: down start
4949
update: pull down start
5050
upgrade: down clean start
5151

52+
STORAGE_DIR := $(shell grep -m1 '^STORAGE_DIR=' .env 2>/dev/null | cut -d= -f2- | tr -d '"')
53+
STORAGE_DIR := $(if $(STORAGE_DIR),$(STORAGE_DIR),./storage)
54+
5255
cleanEtcStorage:
53-
rm -rf etc/ storage/
56+
rm -rf etc/ $(STORAGE_DIR)

docker-compose.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ services:
66
context: .
77
dockerfile: Dockerfile-generateconfig-anyconf
88
volumes:
9-
- ./:/code:Z
9+
- ./.env:/code/.env:ro,Z
10+
- ./docker-generateconfig:/code/docker-generateconfig:ro,Z
1011
- "${STORAGE_DIR}:/code/storage:Z"
1112

1213
# processing any-sync-* configs
@@ -19,7 +20,9 @@ services:
1920
context: .
2021
dockerfile: Dockerfile-generateconfig-processing
2122
volumes:
22-
- ./:/code:Z
23+
- ./.env:/code/.env:ro,Z
24+
- ./docker-generateconfig:/code/docker-generateconfig:ro,Z
25+
- ./etc:/code/etc:Z
2326
- "${STORAGE_DIR}:/code/storage:Z"
2427

2528
mongo-1:

0 commit comments

Comments
 (0)