Re: Ci automated deploy of seaside to Digital Ocean

"Esteban A. Maringolo" <[email protected]>
Newsgroups gmane.comp.lang.smalltalk.squeak.seaside
Message-ID <[email protected]>

On 10/05/2018 15:30, Esteban A. Maringolo wrote:
> How would you know when to kill the running vm+image? It might have
> active sessions.
> 
> If you don't care about that, what I used to manage a bunch of "worker
> images" (process groups) with supervisord [1], so in that case you'd
> stop all the related workers, copy the new image, and start the
> workers again.
My supervisord.conf entry for a pool of working images was:

[program:psworker]
command=/home/trentosur/perfectstore/pharo-vm/pharo --nodisplay
/home/trentosur/perfectstore/ps.image worker.st 818%(process_num)1d
process_name=%(program_name)s_%(process_num)02d ; process_name expr
(default %(program_name)s)
numprocs=2
directory=/home/trentosur/perfectstore
autostart=false
autorestart=true
user=trentosur
stopasgroup=true
killasgroup=true


Part of the worker.st file handling the port number was:

"Seaside server start"
Smalltalk isHeadless ifTrue: [
  Smalltalk commandLine arguments
    ifEmpty: [
      Transcript show: 'No port parameter was specified.'; cr.
      Smalltalk quitPrimitive. ]
    ifNotEmpty: [:args |
      | port |
      port := args first asNumber asInteger.
      Transcript show: 'Starting worker image at port ', port asString; cr.
      ZnZincServerAdaptor  startOn: port.
      ZnZincServerAdaptor default server debugMode: false.
    ]
  ]
  ifFalse: [
      | port |
      port := 8080.
      Transcript show: 'Starting worker image at port ', port asString; cr.
      ZnZincServerAdaptor  startOn: port.
      ZnZincServerAdaptor default server debugMode: true.
    ].


I hope it helps.

Best regards,



-- 
Esteban A. Maringolo
_______________________________________________
seaside mailing list
[email protected]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.