How to set CONTAINER_PRESERVE_OWNER for multiple directories. #168
-
|
Hi Felddy, Starting a discussion to check if makes sense the feature change to allow multiple directories. Today when I deploy my system besides a Today the way the prune works, it only exclude 1 given directory. I'm still thinking in a way to improve the search that doesn't cost much performance to the system so we can use commanDelimitedList to the CONTAINER_PRESERVE_OWNER. Any thoughts if this makes sense and if it's a thing we should work in change? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
|
Hi Hugo, Since the For example if you had two asset directories you want to preserve ownership on:
Setting I tested this with ---
version: "3.8"
secrets:
credentials:
file: credentials-mine.json
services:
foundry:
image: felddy/foundryvtt:release
hostname: felddy_foundryvtt
init: true
restart: "no"
volumes:
- type: bind
source: ./data
target: /data
environment:
- CONTAINER_CACHE=/data/container_cache
- CONTAINER_PRESERVE_OWNER=/data/Data/assets\|/data/Data/more-assets
- CONTAINER_VERBOSE=true
- TIMEZONE=US/Eastern
- FOUNDRY_UID=501
- FOUNDRY_GID=20
secrets:
- source: credentials
target: config.json
ports:
- target: 30000
published: 30000
protocol: tcpHopefully this helps. Let me know if it works for you. |
Beta Was this translation helpful? Give feedback.
Hi Hugo,
Since the
CONTAINER_PRESERVE_OWNERvariable accepts a regular expression you can just add an "or" and an additional term.For example if you had two asset directories you want to preserve ownership on:
/data/Data/assets/data/Data/more-assetsSetting
CONTAINER_PRESERVE_OWNERto/data/Data/assets\|/data/Data/more-assetswill cause both paths to be pruned and not passed tochown.I tested this with
docker-composeand it acted as expected: