Files
custom-html/compose.sftp.yml
T
renovate-bot 42e95cdf06
continuous-integration/drone/pr Build is failing
chore(deps): pin dependencies
2026-09-18 19:04:41 +00:00

42 lines
1.0 KiB
YAML

version: "3.8"
services:
ssh:
image: lscr.io/linuxserver/openssh-server:latest@sha256:39ba37d50fdd6be1bf70644c871e5dcb9234ee79ac56424ea03ca08cadf1e7b0
networks:
- proxy
environment:
- PUID=1000
- PGID=1000
- TZ=Etc/UTC
- USER_NAME=sftp
- PUBLIC_KEY
volumes:
- content:/content:rw
ports:
- 2220:2222
deploy:
restart_policy:
condition: on-failure
# The following is an admittedly hacky way of setting the owner
# of the `content` volume to the unprivileged `sftp` user, so
# that content can be transferred through the unprivileged sshd process
# using `scp` etc.
sshstart:
image: lscr.io/linuxserver/openssh-server:latest@sha256:39ba37d50fdd6be1bf70644c871e5dcb9234ee79ac56424ea03ca08cadf1e7b0
user: root
depends_on:
- ssh
deploy:
restart_policy:
condition: none
volumes:
- content:/content:rw
entrypoint: [ "bash", "-c", "sleep 10 && chown -R 1000:1000 /content"]
volumes:
content:
networks:
proxy:
external: true