Skip to content
This repository was archived by the owner on Aug 15, 2022. It is now read-only.

Run nginx as a worker#11334

Merged
cihangir merged 3 commits intokoding:masterfrom
szkl:nginx
Jun 30, 2017
Merged

Run nginx as a worker#11334
cihangir merged 3 commits intokoding:masterfrom
szkl:nginx

Conversation

@szkl
Copy link
Member

@szkl szkl commented Jun 28, 2017

Signed-off-by: Sonmez Kartal sonmez@koding.com

nginx:
group: 'webserver'
supervisord:
command: 'nginx -c %(ENV_KONFIG_PROJECTROOT)s/nginx.conf'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/nginx.conf/deployment/generated_files/nginx.conf

also could you remove the fs.writeFileSync "./nginx.conf", KONFIG.nginxConf line from configure? any idea why we are duplicating it?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could you also change the "stopsignal" to QUIT for supervisord conf of this worker? we will make sure that nginx is restarted/stopped gracefully.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't recall. I suppose it was just to have a shorter path.

Stop signal is a good catch. Also, that reminded me an old observation. I think supervisorctl shutdown kills the subprocesses because it is much faster than supervisorctl stop all. I'll dig into it.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll remove redundant configuration output files in a separate pull request.



"/opt/elasticbeanstalk/hooks/appdeploy/post/070_configure_supervisord.sh":
"/opt/elasticbeanstalk/hooks/appdeploy/post/070_configure_nginx.sh":
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

old files might stay during updates if machine is not get recycled

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I should add current file names to overrides configuration.

Copy link
Contributor

@cihangir cihangir left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

better to have stopsignal changed to QUIT

@szkl szkl closed this Jun 30, 2017
@szkl szkl deleted the nginx branch June 30, 2017 10:48
@szkl szkl restored the nginx branch June 30, 2017 10:49
@szkl szkl reopened this Jun 30, 2017
Sonmez Kartal added 3 commits June 30, 2017 15:22
Signed-off-by: Sonmez Kartal <sonmez@koding.com>
Signed-off-by: Sonmez Kartal <sonmez@koding.com>
Signed-off-by: Sonmez Kartal <sonmez@koding.com>
@szkl
Copy link
Member Author

szkl commented Jun 30, 2017

Updated.

startsecs : 10
startretries : 5
stopsignal : 'TERM'
stopsignal : options.stopsignal or 'TERM'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is not needed, line 65 already handles those

@cihangir cihangir merged commit a31361a into koding:master Jun 30, 2017
@szkl szkl deleted the nginx branch July 1, 2017 15:53
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants