> On 23 Oct 2014, at 20:16, Esteban A. Maringolo <[email protected]> wrote: > > tl;dr version: > > I'd like to be able to do something like > > $PATH/app/pharo-vm/pharo --nodisplay app.image st setup-worker.st --port 8091 > and: > $PATH/app/pharo-vm/pharo --nodisplay app.image st setup-worker.st --port 8092 > etc. > > Do I have to define a subclass of STCommandLineHandler?
yes > > How can I capture the --port argument? For what I saw, only "boolean" > parameters can be defined (--quit, --save, etc, without arguments). It > is, no getopts compatibility. no idea… we can work on that… is necessary :) Esteban > > > Long version: > For my apps I have a pool of worker images with Zinc+Seaside behind an > nginx proxy. > > Each "upstream" (aka "worker") server, is started by supervisord, > using a separate startup smalltalk script, where the only thing I > change is the port of ZnZincServerAdaptor to start on a different > port. The rest is identical. > > The startup is something like: > $PATH/app/pharo-vm/pharo --nodisplay app.image st setup-worker1.st > and for worker2: > $PATH/app/pharo-vm/pharo --nodisplay app.image st setup-worker2.st > and for worker3: > $PATH/app/pharo-vm/pharo --nodisplay app.image st setup-worker3.st > etc. > > Is there a better way to perform this without having to copy > setup-worker1.st to setup-workerN.st for each worker image? > > How do you manage this? > > Regards, > > Esteban A. Maringolo >
