Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add SCP server for uploading client files #181

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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]:8022
#
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