Skip to content

Commit

Permalink
Moved some of the complexity of running the stock importer into a sep…
Browse files Browse the repository at this point in the history
…arate script, to simplify the process from outside the Docker container.
  • Loading branch information
Michael Grant committed Jul 22, 2016
1 parent 4b10ce1 commit bf9de74
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ ADD bin /usr/commercetools/stock-import/bin
ADD lib /usr/commercetools/stock-import/lib
ADD node_modules /usr/commercetools/stock-import/node_modules

CMD [ "/usr/commercetools/stock-import/bin/stock-import" ]
CMD [ "/usr/commercetools/stock-import/bin/run_stock_import.sh" ]
5 changes: 5 additions & 0 deletions bin/run_stock_import.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/sh

echo Running CSV stock import for project $SPHERE_PROJECT_KEY with SFTP username $SFTP_USERNAME, SFTP in directory $SFTP_IN_DIRECTORY and SFTP out directory $SFTP_OUT_DIRECTORY

/usr/commercetools/stock-import/bin/stock-import --projectKey=$SPHERE_PROJECT_KEY --sphereHost=api.sphere.io --sphereProtocol=https --sphereAuthHost=auth.sphere.io --sphereAuthProtocol=https --sftpHost=sftp.sphere.io --sftpUsername=$SFTP_USERNAME --sftpPassword=$SFTP_PASSWORD --sftpSource=$SFTP_IN_DIRECTORY --sftpTarget=$SFTP_OUT_DIRECTORY

0 comments on commit bf9de74

Please sign in to comment.