Skip to content

Commit ae55fb1

Browse files
committed
fix: Mettre à jour la configuration S3FS pour utiliser un comptage parallèle de 10 et ajouter un répertoire de cache
1 parent 6327be7 commit ae55fb1

2 files changed

Lines changed: 13 additions & 2 deletions

File tree

sftp/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ COPY --chmod=755 common/ /
1515

1616
EXPOSE 22
1717

18-
ENV S3FS_PARALLEL_COUNT=5
18+
ENV S3FS_PARALLEL_COUNT=10
1919
ENV S3FS_MULTIPART_SIZE=128
2020

2121
HEALTHCHECK \

sftp/common/usr/local/bin/docker-sftp-entrypoint

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,14 @@ function setupS3FS() {
173173
S3FS_ARGS="${S3FS_ARGS} -o nocopyapi"
174174
fi
175175

176-
S3FS_PARALLEL_COUNT=${S3FS_PARALLEL_COUNT:-5}
176+
# Setup cache directory
177+
S3FS_CACHE_DIR=${S3FS_CACHE_DIR:-"/tmp/s3fs_cache"}
178+
mkdir -p "$S3FS_CACHE_DIR"
179+
chmod 777 "$S3FS_CACHE_DIR"
180+
S3FS_ARGS="${S3FS_ARGS} -o use_cache=${S3FS_CACHE_DIR}"
181+
182+
# Setup S3FS_PARALLEL_COUNT and S3FS_MULTIPART_SIZE
183+
S3FS_PARALLEL_COUNT=${S3FS_PARALLEL_COUNT:-10}
177184
S3FS_MULTIPART_SIZE=${S3FS_MULTIPART_SIZE:-128}
178185

179186
S3FS_PARALLEL_COUNT=$(($S3FS_PARALLEL_COUNT))
@@ -182,6 +189,10 @@ function setupS3FS() {
182189
S3FS_ARGS="${S3FS_ARGS} -o parallel_count=${S3FS_PARALLEL_COUNT}"
183190
S3FS_ARGS="${S3FS_ARGS} -o multipart_size=${S3FS_MULTIPART_SIZE}"
184191

192+
# Enable big_writes support
193+
S3FS_ARGS="${S3FS_ARGS} -o big_writes"
194+
S3FS_ARGS="${S3FS_ARGS} -o kernel_cache"
195+
185196
echo "Start with s3fs ${DEBUG_OPTS} ${S3FS_ARGS} -o passwd_file=${S3FS_AUTHFILE} -o url=${AWS_ENDPOINT} -o endpoint=${AWS_DEFAULT_REGION}"
186197

187198
# Mount and verify that something is present. davfs2 always creates a lost+found

0 commit comments

Comments
 (0)