Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deployment security questions and docker hub login problem #6

Closed
lsiem opened this issue Apr 1, 2022 · 3 comments
Closed

Deployment security questions and docker hub login problem #6

lsiem opened this issue Apr 1, 2022 · 3 comments

Comments

@lsiem
Copy link

lsiem commented Apr 1, 2022

First of all, thank you for making this project available.
I have a few questions/problems regarding the deployment that I hope you can answer for me.

When running the build-deploy action, I always get at the "Dockerhub login" step that the username and password is incorrect, even though I entered the correct data.
I have also tried with a personal access token, but also without success

The folder user_data contains important information (API Keys etc...). Can I also provide this via the Github Secrets? Or how do I do that without everyone being able to see this data (you can't make forked repos private).

Thank you for helping me out!

@joaorafaelm
Copy link
Collaborator

Hello,

I think you need to change this file https://github.com/p-zombie/freqtrade/blob/master/.github/workflows/main.yml#L37
and enter your dockerhub username there instead of mine.

Also, for the API keys, you need to create a .env file containing the secrets, and place it in the docker host server at /root/freqtrade

@lsiem
Copy link
Author

lsiem commented Apr 4, 2022

Thank you for the answer.
Entering my dockerhub username at this line fixed the login problem.
But now I'm getting another error:

Run wshihadeh/docker-deployment-action@master
  with:
    remote_docker_host: ***
    ssh_private_key: ***
  
    ssh_public_key: ***
    deployment_mode: docker-compose
    copy_stack_file: true
    deploy_path: /root/freqtrade
    stack_file_name: production.yml
    pull_images_first: true
    keep_files: 3
    args: up -d --force-recreate
    remote_docker_port: [2](https://github.com/lsiem/freqtrade/runs/5812931967?check_suite_focus=true#step:10:2)2
/usr/bin/docker run --name bcf09cb[3](https://github.com/lsiem/freqtrade/runs/5812931967?check_suite_focus=true#step:10:3)d29583c2a[4](https://github.com/lsiem/freqtrade/runs/5812931967?check_suite_focus=true#step:10:4)f87bde4a3f924ded79[5](https://github.com/lsiem/freqtrade/runs/5812931967?check_suite_focus=true#step:10:5)_fad588 --label 2bcf09 --workdir /github/workspace --rm -e INPUT_REMOTE_DOCKER_HOST -e INPUT_SSH_PRIVATE_KEY -e INPUT_SSH_PUBLIC_KEY -e INPUT_DEPLOYMENT_MODE -e INPUT_COPY_STACK_FILE -e INPUT_DEPLOY_PATH -e INPUT_STACK_FILE_NAME -e INPUT_PULL_IMAGES_FIRST -e INPUT_KEEP_FILES -e INPUT_ARGS -e INPUT_REMOTE_DOCKER_PORT -e INPUT_DOCKER_PRUNE -e INPUT_PRE_DEPLOYMENT_COMMAND_ARGS -e HOME -e GITHUB_JOB -e GITHUB_REF -e GITHUB_SHA -e GITHUB_REPOSITORY -e GITHUB_REPOSITORY_OWNER -e GITHUB_RUN_ID -e GITHUB_RUN_NUMBER -e GITHUB_RETENTION_DAYS -e GITHUB_RUN_ATTEMPT -e GITHUB_ACTOR -e GITHUB_WORKFLOW -e GITHUB_HEAD_REF -e GITHUB_BASE_REF -e GITHUB_EVENT_NAME -e GITHUB_SERVER_URL -e GITHUB_API_URL -e GITHUB_GRAPHQL_URL -e GITHUB_REF_NAME -e GITHUB_REF_PROTECTED -e GITHUB_REF_TYPE -e GITHUB_WORKSPACE -e GITHUB_ACTION -e GITHUB_EVENT_PATH -e GITHUB_ACTION_REPOSITORY -e GITHUB_ACTION_REF -e GITHUB_PATH -e GITHUB_ENV -e GITHUB_STEP_SUMMARY -e RUNNER_OS -e RUNNER_ARCH -e RUNNER_NAME -e RUNNER_TOOL_CACHE -e RUNNER_TEMP -e RUNNER_WORKSPACE -e ACTIONS_RUNTIME_URL -e ACTIONS_RUNTIME_TOKEN -e ACTIONS_CACHE_URL -e GITHUB_ACTIONS=true -e CI=true -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/home/runner/work/_temp/_github_home":"/github/home" -v "/home/runner/work/_temp/_github_workflow":"/github/workflow" -v "/home/runner/work/_temp/_runner_file_commands":"/github/file_commands" -v "/home/runner/work/freqtrade/freqtrade":"/github/workspace" 2bcf09:cb3d29583c2a4f8[7](https://github.com/lsiem/freqtrade/runs/5812931967?check_suite_focus=true#step:10:7)bde4a3f[9](https://github.com/lsiem/freqtrade/runs/5812931967?check_suite_focus=true#step:10:9)24ded795 up -d --force-recreate
Registering SSH keys...
Agent pid [10](https://github.com/lsiem/freqtrade/runs/5812931967?check_suite_focus=true#step:10:10)
Identity added: /github/home/.ssh/id_rsa (root@localhost)
Add known hosts
Execute Over SSH: mkdir -p /root/freqtrade/stacks || true

After these lines the deployment step fails.
I created a ssh key with the root user and provided it.
May you help me fixing this problem?

@joaorafaelm
Copy link
Collaborator

I think you might need to ssh into the docker host and try to bring it up manually to check if there is any useful information you can get from the logs, other than that, if the ssh connection is successful, it should work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants