$ openssl genpkey -algorithm RSA -out private_key.pem -pkeyopt rsa_keygen_bits:2048
$ openssl rsa -pubout -in private_key.pem -out public_key.pem
Copy docker-compose.yml
from this repo, open, configure with your keys and credentials, then run:
$ docker-compose up -d
$ curl http://<HOST>/public_key -so ~/.hex/<REPO_NAME>.pem
$ mix hex.repo add <REPO_NAME> http://<HOST> --public-key ~/.hex/<REPO_NAME>.pem --auth-key <AUTH_KEY>
defp deps do
[
{:package, "~> 1.0", repo: "<REPO_NAME>"},
]
end
$ HEX_API_URL=http://<HOST> HEX_API_KEY=<AUTH_KEY> mix hex.publish package
You can configure HexMini release with theese env variables:
HM_PUBLIC_KEY # public key contents or path to file
HM_PRIVATE_KEY # private key contents or path to file
HM_DATA_PATH # data path, default to: /var/lib/hex_mini
HM_CREDENTIALS_FILE # path to credentials file
Credentials file should follow this format:
<username>:<auth_token>
Like:
john_doe@local.dev:auth_token1
john_doe:auth_token2
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request