Add FTP Host path as env

This commit is contained in:
Anthony Mineo 2021-03-13 11:38:56 -05:00
parent 9222b8f0d6
commit ddf8c112f5
2 changed files with 5 additions and 3 deletions

View file

@ -26,10 +26,11 @@ func initFTP() {
ftpHOST := os.Getenv("FTP_HOST")
ftpUSER := os.Getenv("FTP_USER")
ftpPW := os.Getenv("FTP_PW")
ftpPath := os.Getenv("FTP_PATH")
fmt.Println("Downloading stat files from", ftpHOST)
fmt.Println("Downloading stat files from", ftpHOST + ftpPath)
err, out, errout := Shellout("wget --recursive -nH --cut-dirs=4 --user=" + ftpUSER + " --no-parent --password=" + ftpPW + " -P /app/serverStats/stats/ ftp://" + ftpHOST + "/" + ftpHOST + "Tribes2/GameData/Classic/serverStats/stats/")
err, out, errout := Shellout("wget --recursive -nH --cut-dirs=4 --user=" + ftpUSER + " --no-parent --password=" + ftpPW + " -P /app/serverStats/stats/ ftp://" + ftpHOST + ftpPath)

View file

@ -24,7 +24,7 @@ services:
constraints: [node.role == manager]
parser:
image: "amineo/t2-stats-parser:v0.4.0"
image: "amineo/t2-stats-parser:v0.4.1"
build:
context: .
dockerfile: ./build/go-t2-stat-parser/Dockerfile
@ -33,6 +33,7 @@ services:
FTP_HOST: "${FTP_HOST}"
FTP_USER: "${FTP_USER}"
FTP_PW: "${FTP_PW}"
FTP_PATH: "${FTP_PATH}"
depends_on:
- db
networks: