-
Notifications
You must be signed in to change notification settings - Fork 76
Open
Description
The remote will ssh in and end up at the home dir, for example.
/root
Currently the stack file is copied to the remote at the deploy_path location. So with a config with deploy_path: /root/my-deployment as in the example, the file will exist here: deploy_path: /root/my-deployment/docker-compose.yml
The script does not handle this. Deployment command is hard coded before the file is placed and only points to it by name
| DEPLOYMENT_COMMAND="docker $DEPLOYMENT_COMMAND_OPTIONS stack deploy --compose-file $STACK_FILE" |
This means you will get errors like this if you have it place the files anywhere other than the ssh user's root:
stack_file_name: No such file or directory
docker-compose.yml: No such file or directory
WORKAROUND
Until anything changes, if you are going to copy the files, it looks like you must specify the ssh user's $HOME dir.
- name: Deploy to Docker swarm
uses: wshihadeh/docker-deployment-action@v1
with:
remote_docker_host: user@host
ssh_private_key: ${{ secrets.DOCKER_SSH_PRIVATE_KEY }}
ssh_public_key: ${{ secrets.DOCKER_SSH_PUBLIC_KEY }}
deployment_mode: docker-swarm
copy_stack_file: true
deploy_path: /root/
stack_file_name: docker-compose.yml
keep_files: 5
args: my_project
tristiisch
Metadata
Metadata
Assignees
Labels
No labels