try optimize setup
This commit is contained in:
parent
38a06d7e06
commit
8a0406c65c
|
|
@ -83,6 +83,9 @@ services:
|
|||
image: tusproject/tusd:v1.12.0
|
||||
container_name: tusd
|
||||
restart: unless-stopped
|
||||
# Host volume is often owned by root (created by provisioning scripts),
|
||||
# while tusd image runs as a non-root user; run as root to avoid /data permission issues.
|
||||
user: "0:0"
|
||||
command:
|
||||
- -host=0.0.0.0
|
||||
- -port=1080
|
||||
|
|
|
|||
3
start.sh
3
start.sh
|
|
@ -489,6 +489,9 @@ update_env IPFS_SWARM_KEY_FILE "$SWARM_KEY_FILE_DEFAULT"
|
|||
|
||||
# Ensure data directories exist
|
||||
mkdir -p "$BASE_DIR/postgres-data" "$BASE_DIR/data/ipfs" "$BASE_DIR/data/tusd" "$BASE_DIR/app-logs" "$BASE_DIR/dynamicStorage"
|
||||
# tusd writes into /data inside container which is mounted from $BASE_DIR/data/tusd on host.
|
||||
# On fresh provision this directory is often root-owned (0755) which causes tusd "permission denied".
|
||||
chmod 0777 "$BASE_DIR/data/tusd" 2>/dev/null || true
|
||||
update_env DB_DATA_DIR_HOST "$BASE_DIR/postgres-data"
|
||||
update_env IPFS_DATA_DIR_HOST "$BASE_DIR/data/ipfs"
|
||||
update_env TUSD_DATA_DIR_HOST "$BASE_DIR/data/tusd"
|
||||
|
|
|
|||
Loading…
Reference in New Issue