README.md in t2_airtime-0.5.2 vs README.md in t2_airtime-0.6.0

- old
+ new

@@ -16,57 +16,59 @@ ### Install as a Ruby gem ``` sh gem install t2_airtime ``` +### Setup Transfer-To credentials -### Using Docker - alternative if you don't install ruby or installation not work for you +1. Make sure you are a registered user of [Transfer-To](https://www.transfer-to.com/home). +2. Enable Two Factor Authentication (2FA) in your [Transfer-To Shop](https://shop.transferto.com) Security Center section +2. Retrieve API key (token) created by Transfer-To Shop. +3. Export your secrets as an environment variables: -Download image: - -``` -docker pull voxbox/t2_airtime -``` - -Export your secrets: - ```sh export T2_SHOP_USER=<your_username> export T2_AIRTIME_KEY=<your_token> ``` -Export the host allowed to access the API (CORS): +4. Export the host allowed to access the API (CORS): ```sh export CORS_ORIGIN=<your_frontend_address> ``` -Run: +5. Export your API secrets: ```sh +export API_KEY=<t2_airtime_key> +export API_TOKEN=<t2_airtime_token> +``` + + +### Using Docker + +1. Download image: + +``` +docker pull voxbox/t2_airtime +``` + +2. Export your secrets in env (see previous step) + +3. Run: + +```sh docker run -d \ --name t2_airtime \ -p 3000:3000 \ -e T2_SHOP_USER \ -e T2_AIRTIME_KEY \ + -e API_KEY \ + -e API_TOKEN \ -e CORS_ORIGIN \ voxbox/t2_airtime -docker logs t2_airtime -f ``` - -### Setup Transfer-To credentials - -1. Make sure you are a registered user of [Transfer-To](https://www.transfer-to.com/home). -2. Enable Two Factor Authentication (2FA) in your [Transfer-To Shop](https://shop.transferto.com) Security Center section -2. Retrieve API key (token) created by Transfer-To Shop. -3. Export your secrets as an environment variables: - -```sh -export T2_SHOP_USER=<your_username> -export T2_AIRTIME_KEY=<your_token> -``` - ## Development 1. If needed, install bundler: ```sh @@ -90,9 +92,16 @@ Inside the `t2_airtime` repository directory run: ```sh $ bundle exec rspec +``` + +To start a development server: + +```sh +$ cd spec/dummy +$ puma -C config/puma.rb ``` ## License \ No newline at end of file