ergoplatform / oracle-core

Core off-chain component of Oracle Pools
Apache License 2.0
62 stars 37 forks source link

Add cross-build Dockerfile and DockerHub publish action #310

Closed reqlez closed 1 year ago

reqlez commented 1 year ago

For the current Dockerfile, if people want to mount a directory into the container, we will have to add some documentation to set their "/data" folder mounted inside the container to 9010 UID permissions as this is the UID of oracle-core user inside the container.

ex: on the docker host, run sudo chown -R 9010:9010 oracle_data

An example of using this image with docker compose. User will need to place oracle_config.yaml and pool_config.yaml under the oracle_data folder:

` core: image: ergoplatform/oracle-core:latest volumes:

I'm also recommending users to set the ports to following to make it easier: oracle api:9010 oracle monitoring: 9011

reqlez commented 1 year ago

Now that I'm thinking about it, maybe best to trigger this on:

on: release: types: [published]

? @greenhat

reqlez commented 1 year ago

Looking great! Thank you! Please add the instructions for the users you mentioned in the PR description as the section in README.md. Besides that, I'd like to run this action in this PR to test the process. I suggested a way in the comments.

Okay, let me work on some quick documentation here.

reqlez commented 1 year ago

@greenhat it's throwing Error: Username and password required near the end there. Are you sure secrets are setup in this repo?

greenhat commented 1 year ago

@greenhat it's throwing Error: Username and password required near the end there. Are you sure secrets are setup in this repo?

Oops, my bad! I set the secrets, but github does not show them when running actions for external PR for security reasons. Let me check if I can override this.

reqlez commented 1 year ago

@greenhat it's throwing Error: Username and password required near the end there. Are you sure secrets are setup in this repo?

Oops, my bad! I set the secrets, but github does not show them when running actions for external PR for security reasons. Let me check if I can override this.

Are you sure that it's not because this is coming from my repo so I have to actually set my DockerHub credentials for this test ?

image

greenhat commented 1 year ago

af

@greenhat it's throwing Error: Username and password required near the end there. Are you sure secrets are setup in this repo?

Oops, my bad! I set the secrets, but github does not show them when running actions for external PR for security reasons. Let me check if I can override this.

Are you sure that it's not because this is coming from my repo so I have to actually set my DockerHub credentials for this test ?

Hm, I don't think it would work, but you can try to set the secrets in your fork.

reqlez commented 1 year ago

You are correct, it does not work. Not only that, but here is what i found:

"you've forked another user's repository and want to contribute workflow changes requiring secrets, the main repo's owner(s) will have to add secrets with the same name. Additionally, secrets aren't used in Pull Requests workflow runs. Hence you'll only see if it's working after the changes have been merged into the repository."

I don't think we can test the final push process until this is all merged. In any case, I will modify this back and add some things to README for now.