diff --git a/.env.sample b/.env.sample index 3992a83..6b27e7b 100644 --- a/.env.sample +++ b/.env.sample @@ -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 \ No newline at end of file +#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? \ No newline at end of file diff --git a/compose.sftp.yml b/compose.sftp.yml new file mode 100644 index 0000000..10b1a12 --- /dev/null +++ b/compose.sftp.yml @@ -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