Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Switch to GitLab Next
Sign in / Register
Toggle navigation
Open sidebar
pcmt
pcmt
Commits
8f049a00
Commit
8f049a00
authored
Dec 15, 2020
by
Josh Zamor
Browse files
#724
, chg ftp-put's volumes and paths and readme
parent
a72b1d05
Pipeline
#245188414
failed with stages
in 13 minutes and 11 seconds
Changes
3
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
34 additions
and
7 deletions
+34
-7
deploy/ftp-put/README.md
deploy/ftp-put/README.md
+28
-0
deploy/ftp-put/set-env.sh
deploy/ftp-put/set-env.sh
+2
-2
docker-compose.prod.yml
docker-compose.prod.yml
+4
-5
No files found.
deploy/ftp-put/README.md
0 → 100644
View file @
8f049a00
# SFTP Upload Tool
This tool downloads XML files for processing by the PCMT. See
https://gitlab.com/pcmt/pcmt/-/issues/681
## Configure
Environment variables to configure how this container runs. Ones without
a default are
*required*
. Aside from
`FTP_PUT_CREDS`
, any may be set in the
file that
`FTP_PUT_CREDS`
points to.
1.
`FTP_PUT_CREDS`
: Where the file that contains the credentials will be
mounted into the container. Default:
`/run/secrets/ftp-put-creds`
1.
`SFTP_USER`
: The SFTP username, should be in
`FTP_GET_CREDS`
.
1.
`SFTP_HOST`
: The SFTP hostname, should be in
`FTP_GET_CREDS`
.
1.
`SFTP_PRIVKEY_FILENAME`
: Set where the file that contains the SFTP user's
private OpenSSH key will be mounted into the container.
1.
`SFTP_LOCAL_DIR`
: Where the files to upload to the SFTP server are
to. Default:
`/uploads/work`
.
1.
`SFTP_LOCAL_ARCHIVE_DIR`
: Where the files will be moved to, locally, after
they are uploaded. Defaults to
`/uploads/done`
.
1.
`SFTP_REMOTE_DIR`
: The remote working directory to upload files to.
1.
`SFTP_REMOTE_ARCHIVE_DIR`
: The remote final destination directory to move files
to, once they're _fully_ uploaded to
`SFTP_REMOTE_DIR`
.
## Example
See
[
ftp-get
](
../ftp-get/README.md
)
for examples.
\ No newline at end of file
deploy/ftp-put/set-env.sh
View file @
8f049a00
...
...
@@ -26,9 +26,9 @@ source "$FTP_PUT_CREDS"
:
"
${
SFTP_HOST
:?SFTP_HOST
not set
}
"
:
"
${
SFTP_PRIVKEY_FILENAME
:?SFTP_PRIVKEY_FILENAME
not set
}
"
error_when_unreadable
"
$SFTP_PRIVKEY_FILENAME
"
:
"
${
SFTP_LOCAL_DIR
:
=/
down
loads/work
}
"
:
"
${
SFTP_LOCAL_DIR
:
=/
up
loads/work
}
"
error_when_unreadable
"
$SFTP_LOCAL_DIR
"
:
"
${
SFTP_LOCAL_ARCHIVE_DIR
:
=/
down
loads/done
}
"
:
"
${
SFTP_LOCAL_ARCHIVE_DIR
:
=/
up
loads/done
}
"
error_when_unreadable
"
$SFTP_LOCAL_ARCHIVE_DIR
"
:
"
${
SFTP_REMOTE_DIR
:?SFTP_REMOTE_DIR
not set
}
"
:
"
${
SFTP_REMOTE_ARCHIVE_DIR
:?SFTP_REMOTE_ARCHIVE_DIR
not set
}
"
...
...
docker-compose.prod.yml
View file @
8f049a00
...
...
@@ -9,6 +9,7 @@ services:
fpm
:
volumes
:
-
'
ftp-get:/srv/pim/src/PcmtCoreBundle/Resources/E2OpenImport/work/'
-
'
ftp-put:/srv/pim/src/PcmtCISBundle/Resources/E2OpenCIS/'
mysql
:
ports
:
...
...
@@ -70,12 +71,10 @@ services:
environment
:
CRON_SCHEDULE
:
'
*/10
*
*
*
*'
SFTP_PRIVKEY_FILENAME
:
'
/run/secrets/sftp-privkey'
SFTP_LOCAL_DIR
:
'
/srv/pim/src/PcmtCISBundle/Resources/E2OpenCIS/work/'
SFTP_LOCAL_ARCHIVE_DIR
:
'
/srv/pim/src/PcmtCISBundle/Resources/E2OpenCIS/done/'
SFTP_REMOTE_DIR
:
'
/in/.sftp/'
SFTP_REMOTE_ARCHIVE_DIR
:
'
/in/'
SFTP_LOCAL_DIR
:
'
/uploads/work/'
SFTP_LOCAL_ARCHIVE_DIR
:
'
/uploads/done/'
volumes
:
-
'
ftp-put:/
srv/pim/src/PcmtCoreBundle/Resources/E2OpenImport/
'
-
'
ftp-put:/
uploads
'
secrets
:
-
ftp-put-creds
-
sftp-privkey
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment