You are not logged in.
- Topics: Active | Unanswered
Pages: 1
#1 03-05-2017 12:57:36
- Fleurou
- Membre
- Registered: 03-05-2017
- Posts: 11
Reloading uwsgi from SSH
Hi there,
I am using Python/Django and migrated recently to the new infrastructure using uwsgi.
When I perform a change on my website, I need to 'restart' the site from the admin tool https://admin.alwaysdata.com/site/
This is impractical when you want to automate deployment. Is there a way to automatically reload the site (notably uwsgi) from the SSH access? (for example touching a file or sending a SIGHUP to a process)
Thanks
Florian
Offline
#3 03-05-2017 13:23:06
- Fleurou
- Membre
- Registered: 03-05-2017
- Posts: 11
Re: Reloading uwsgi from SSH
Hi Cedric,
Thanks for the fast reply, it works just fine!
For the record, I created a special account with limited rights and used the API token authentication method.
EDIT: you need the trailing slash and the data argument to force curl to use the POST method. For some reason, alwaysdata does not accept GET...
curl --basic --user MYAPIKEY: --data "" https://api.alwaysdata.com/v1/site/MYSITE/restart/
Regards
Florian
Last edited by Fleurou (08-05-2017 11:45:51)
Offline
#4 15-04-2018 16:14:28
- xyber
- Membre
- Registered: 15-04-2018
- Posts: 1
Re: Reloading uwsgi from SSH
I like to restart example site https://example.alwaysdata.net/ with example API key 0123456789ABCDEF0123456789ABCDEF
What is wrong with:
curl --basic --user 0123456789ABCDEF0123456789ABCDEF: --data '' https://api.alwaysdata.com/v1/site/exam … t/restart/
Offline
Pages: 1