add optional feature for sftp webroot access, wip

This commit is contained in:
marlon 2025-01-22 21:59:44 -05:00
parent fb2a287802
commit 8d3acfbd5d
2 changed files with 40 additions and 1 deletions

View File

@ -25,4 +25,9 @@ COMPOSE_FILE="compose.yml"
#REDIRECT_TYPE=permanent
# Optionally handle all URL requests using a single file (commonly index.html)
#SINGLE_PAGE_SITE_HANDLER=/index.html
#SINGLE_PAGE_SITE_HANDLER=/index.html
# Enable an SSH server to allow SFTP uploads to the web root
#COMPOSE_FILE="$COMPOSE_FILE:compose.sftp.yml"
#SECRET_SSH_PASSWORD_VERSION=v1
#SSH_PORT="2222" # this doesn't work yet, maybe an abra bug?

34
compose.sftp.yml Normal file
View File

@ -0,0 +1,34 @@
version: "3.8"
services:
ssh:
image: lscr.io/linuxserver/openssh-server:latest
networks:
- proxy
environment:
- PUID=1000
- PGID=1000
- TZ=Etc/UTC
- PASSWORD_ACCESS=true
- USER_PASSWORD_FILE=/run/secrets/ssh_password
- USER_NAME=sftp
secrets:
- ssh_password
volumes:
- content:/content
ports:
- 2220:2222
deploy:
restart_policy:
condition: on-failure
secrets:
ssh_password:
external: true
name: ${STACK_NAME}_ssh_password_${SECRET_SSH_PASSWORD_VERSION}
volumes:
content:
networks:
proxy:
external: true