Skip to content

Commit

Permalink
Add SCP server for uploading client files
Browse files Browse the repository at this point in the history
Fixes #180
  • Loading branch information
micheljung committed Sep 20, 2021
1 parent ae65b39 commit 1c3b90c
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 0 deletions.
Empty file.
2 changes: 2 additions & 0 deletions config.template/faf-client-upload/faf-client-upload.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
SSH_USERS=data:1000:1000
RSYNC_MODE=true
2 changes: 2 additions & 0 deletions config.template/faf-traefik/traefik.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ entryPoints:
address: ":80"
web-secure:
address: ":443"
client-upload:
address: ":8022"

# Listen for changes on docker and the dynamic configuration file
providers:
Expand Down
24 changes: 24 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -428,6 +428,30 @@ services:
- "traefik.http.routers.faf-user-service.tls.certresolver=default"
- "traefik.http.services.faf-user-service.loadbalancer.server.port=8080"

#
# An SCP server that allows uploading client update files via rsync. Example command:
#
# rsync -avz -e "ssh -p 8022" /build/client/ [email protected]:client
#
faf-client-upload:
container_name: faf-client-upload
image: panubo/sshd@sha256:4be2259311faba55fe9aa5bcac7ae5a3766c8dc64c71af45c0c002d48743e7d9
networks:
faf:
aliases:
- "faf-client-upload"
restart: unless-stopped
volumes:
- ./data/content/client:/home/data/client
- ./config/faf-client-upload/authorized_keys:/etc/authorized_keys/data:ro
env_file: ./config/faf-client-upload/faf-client-upload.env
labels:
- "traefik.enable=true"
- "traefik.tcp.routers.faf-client-upload.rule=HostSNI(`*`)"
- "traefik.tcp.routers.faf-client-upload.entryPoints=client-upload"
- "traefik.tcp.routers.faf-client-upload.service=faf-client-upload"
- "traefik.tcp.services.faf-client-upload.loadbalancer.server.port=22"

networks:
faf:
driver: bridge
Expand Down

0 comments on commit 1c3b90c

Please sign in to comment.