You are viewing a single comment's thread from:

RE: Introducing Move Club - Get Rewarded for working out 👣

in #utopian-io7 years ago

When I tested now --regions bru yesterday It worked as expected but today it ignores it and sets up both (like you noticed). This is an issue, it's clearly stated in the docs what is the expected behaviour.

Instead of that we can do it a different way. Add a scaling rule to your now.json file if you have one, if you don't then create it at the root level of your project folder. e.g

{
  "alias": "move.codewithsam.club",
  "scale": {
    "bru1": {
      "min": 1,
      "max": 1
    }
  }
}

You can see here I have an alias rule and a scale rule. You don't need the alias rule this is just to show you my now.json file.

When running now it should automatically only deploy to the specified region with exactly one instance.


The last command now scale app-name 0- does exactly that, it scales your app to zero instances. Don't run that command unless you want to stop your app running.

Sort:  

Thanks heaps - will give it a shot tomorrow and let you know.

Sort of worked, created now.json file (just removed alias bit)..it seemed to go up ok, no message at all on instances (but unusual normally it says something, even if it's wrong)...but when i go to website says 0 instances. So yeah looks like it loaded up the code but no active instance.

if I scale to 1 it says Error! cannot scale with a static deployment.

it's a little tricky to help without knowing how your code is structured. Static developments are ones that use .html files directly rather than being served via an app.

If it thinks you're running a static development and it's actually for one of your bots then something else is wrong.

is your bot a single .js file?

Yep it's a single file.js file... I think I might know what happened, chance I stuffed up the key thingy, but wouldn't have thought it do that...basically I taught myself to use the package.json approach and inside that you can have a now section. As I have moved to your now.json file approach (can't use both it complains), i think it might been confused around the key portion. I'll have another play, combining your now.json into the package.json instead, i will have a see if autobots are go then :)...if not i might pop back and show you my package.json code, it might make more sense then. Will be a week or so as got too much on the go now and using bot via remote server. I'm not sure if you chat to others on discord, but if you do my name is nigelrhil, Also can see my bot in action here running on local server. It's a simple competition on Steemit I keep evolving the bot/my skills with each iteraction. I've never done anything like this b4, but trying my best to do something different, so really appreciate the support. Cheers.

Coin Marketplace

STEEM 0.26
TRX 0.20
JST 0.038
BTC 95512.86
ETH 3571.27
USDT 1.00
SBD 3.81