From b3b45d60f89e7129be5fb726504884170cfb801b Mon Sep 17 00:00:00 2001 From: Michel Jung Date: Sat, 18 Sep 2021 13:02:56 +0200 Subject: [PATCH] Add SCP server for uploading client files Fixes #180 --- .../faf-client-upload/faf-client-upload.env | 4 ++++ config.template/faf-traefik/traefik.yml | 2 ++ docker-compose.yml | 21 +++++++++++++++++++ 3 files changed, 27 insertions(+) create mode 100644 config.template/faf-client-upload/faf-client-upload.env diff --git a/config.template/faf-client-upload/faf-client-upload.env b/config.template/faf-client-upload/faf-client-upload.env new file mode 100644 index 00000000..f983a3b8 --- /dev/null +++ b/config.template/faf-client-upload/faf-client-upload.env @@ -0,0 +1,4 @@ +AUTHORIZED_KEYS= +DATADIR=/client +USERID=1000 +GROUPID=1000 diff --git a/config.template/faf-traefik/traefik.yml b/config.template/faf-traefik/traefik.yml index 3b41f779..631e3a7b 100644 --- a/config.template/faf-traefik/traefik.yml +++ b/config.template/faf-traefik/traefik.yml @@ -8,6 +8,8 @@ entryPoints: address: ":80" web-secure: address: ":443" + client-upload: + address: ":2222" # Listen for changes on docker and the dynamic configuration file providers: diff --git a/docker-compose.yml b/docker-compose.yml index 7b035c95..e2195b27 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -428,6 +428,27 @@ 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. + # + faf-client-upload: + container_name: faf-client-upload + image: eeacms/scp-server + networks: + faf: + aliases: + - "faf-client-upload" + restart: unless-stopped + volumes: + - ./data/content/client:/client + 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