Skip to content

Commit

Permalink
Reload services on deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
Joe-Heffer-Shef committed Jan 8, 2025
1 parent 83cb30f commit 4398da4
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
2 changes: 2 additions & 0 deletions deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ cp --verbose config/systemd/gunicorn.socket /etc/systemd/system/gunicorn.socket
systemctl daemon-reload
systemctl enable gunicorn.service
systemctl enable gunicorn.socket
systemctl reload gunicorn.service

# Install web reverse proxy server
# Install nginx
Expand All @@ -42,3 +43,4 @@ apt install --yes -qq nginx
rm -f /etc/nginx/sites-enabled/default
cp config/nginx/*.conf /etc/nginx/sites-available
ln -s /etc/nginx/sites-available/gunicorn.conf /etc/nginx/sites-enabled/gunicorn.conf
systemctl reload nginx.service
14 changes: 14 additions & 0 deletions docs/deployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,20 @@ sudo systemctl status gunicorn
sudo systemctl status nginx
```

# View logs

[nginx logs](https://docs.nginx.com/nginx/admin-guide/monitoring/logging/)

```bash
sudo tail /var/log/nginx/error.log
```

[Gunicorn logs](https://docs.gunicorn.org/en/stable/settings.html#logging)

```bash
sudo journalctl -u gunicorn.service
```

# Control

The services are controlled using [`systemd`](https://systemd.io/), which is the service management system on Ubuntu 24. To launch services:
Expand Down

0 comments on commit 4398da4

Please sign in to comment.