Giter Club home page Giter Club logo

Comments (7)

mariusa avatar mariusa commented on July 22, 2024

I see this https://github.com/piku/piku/blob/master/docs/ubuntu-18.04-bionic.md has the simplified version:

sudo ln /home/$PAAS_USERNAME/.piku/uwsgi/uwsgi.ini /etc/uwsgi/apps-enabled/piku.ini
sudo systemctl restart uwsgi

from piku.

rcarmo avatar rcarmo commented on July 22, 2024

The simplified version is the way to go. Feel free to revise the merged docs and do another PR.

from piku.

mariusa avatar mariusa commented on July 22, 2024

Looks like this is enough for uwsgi setup:

ln -s /home/$PAAS_USERNAME/.piku/uwsgi/uwsgi.ini /etc/uwsgi.d/piku.ini

Per my understanding, these 2 files
https://raw.githubusercontent.com/piku/piku/master/uwsgi-piku.service
https://raw.githubusercontent.com/piku/piku/master/uwsgi-piku.dist
are just needed to reload uwsgi on config changes.

uwsgi does this already. Quoting from https://uwsgi-docs.readthedocs.io/en/latest/Emperor.html

Whenever an imperial monitor detects a new configuration file, a new uWSGI instance will be spawned with that configuration.
Whenever a configuration file is modified (its modification time changed, so touch --no-dereference may be your friend), the corresponding app will be reloaded.
Whenever a config file is removed, the corresponding app will be stopped.

from piku.

rcarmo avatar rcarmo commented on July 22, 2024

from piku.

mariusa avatar mariusa commented on July 22, 2024

That makes sense.
I copied linking step from existing https://github.com/piku/piku/blob/master/docs/INSTALL-ubuntu-18.04-bionic.md
(and added -s to work on different filesystems)

Should that ln be replaced with cp in INSTALLs ?

the extra service was a way to avoid breaking the original one in earlier Ubuntu releases

Are those still needed? It seems only this would do the job:

sudo cp /home/$PAAS_USERNAME/.piku/uwsgi/uwsgi.ini /etc/uwsgi/apps-enabled/piku.ini

from piku.

mariusa avatar mariusa commented on July 22, 2024

Back to the request:

Per my understanding, these 2 files
https://raw.githubusercontent.com/piku/piku/master/uwsgi-piku.service
https://raw.githubusercontent.com/piku/piku/master/uwsgi-piku.dist
are just needed to reload uwsgi on config changes.

uwsgi does this already. Quoting from https://uwsgi-docs.readthedocs.io/en/latest/Emperor.html

Whenever an imperial monitor detects a new configuration file, a new uWSGI instance will be spawned with that configuration.
Whenever a configuration file is modified (its modification time changed, so touch --no-dereference may be your friend), the corresponding app will be reloaded.
Whenever a config file is removed, the corresponding app will be stopped.

I've tested this with piku config:set A=b and `piku logs' shows the app being restarted.

Would you please remove to 2 files, to avoid confusion with new setups?

from piku.

mariusa avatar mariusa commented on July 22, 2024

Dupe of #265

from piku.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.