|
|
@@ -6,7 +6,7 @@ This app can run directly on a Raspberry Pi with **nginx + php-fpm** instead of |
|
|
|
|
|
|
|
|
`scripts/deploy-raspi.sh` runs from your local machine and connects over SSH to the Pi. On the Pi it will: |
|
|
`scripts/deploy-raspi.sh` runs from your local machine and connects over SSH to the Pi. On the Pi it will: |
|
|
|
|
|
|
|
|
- install `nginx`, `git`, `composer`, and PHP 8.2 packages |
|
|
|
|
|
|
|
|
- install `nginx`, `git`, `composer`, and the distro-default PHP packages |
|
|
- clone or update the repository |
|
|
- clone or update the repository |
|
|
- create/update `.env` |
|
|
- create/update `.env` |
|
|
- install Composer dependencies |
|
|
- install Composer dependencies |
|
|
@@ -44,7 +44,6 @@ Arguments: |
|
|
```bash |
|
|
```bash |
|
|
DEPLOY_REF=main \ |
|
|
DEPLOY_REF=main \ |
|
|
DEPLOY_PATH=/var/www/warehouse \ |
|
|
DEPLOY_PATH=/var/www/warehouse \ |
|
|
PHP_VERSION=8.2 \ |
|
|
|
|
|
scripts/deploy-raspi.sh pi raspberrypi.local git@github.com:YOUR_USER/warehouse.git DietPi.ntp.kentcommunications.com |
|
|
scripts/deploy-raspi.sh pi raspberrypi.local git@github.com:YOUR_USER/warehouse.git DietPi.ntp.kentcommunications.com |
|
|
``` |
|
|
``` |
|
|
|
|
|
|
|
|
@@ -52,7 +51,7 @@ scripts/deploy-raspi.sh pi raspberrypi.local git@github.com:YOUR_USER/warehouse. |
|
|
|
|
|
|
|
|
- browse to `http://DietPi.ntp.kentcommunications.com` |
|
|
- browse to `http://DietPi.ntp.kentcommunications.com` |
|
|
- check nginx with `sudo systemctl status nginx` |
|
|
- check nginx with `sudo systemctl status nginx` |
|
|
- check php-fpm with `sudo systemctl status php8.2-fpm` |
|
|
|
|
|
|
|
|
- check php-fpm with `systemctl list-units --type=service | grep php.*fpm` |
|
|
- check the queue worker with `sudo systemctl status warehouse-queue.service` |
|
|
- check the queue worker with `sudo systemctl status warehouse-queue.service` |
|
|
|
|
|
|
|
|
## Notes |
|
|
## Notes |
|
|
@@ -60,4 +59,4 @@ scripts/deploy-raspi.sh pi raspberrypi.local git@github.com:YOUR_USER/warehouse. |
|
|
- the app serves from `public/`, so the nginx root must stay pointed there |
|
|
- the app serves from `public/`, so the nginx root must stay pointed there |
|
|
- low-stock emails are always queued in this app, so the queue worker service matters in production |
|
|
- low-stock emails are always queued in this app, so the queue worker service matters in production |
|
|
- this script sets up **HTTP only**; add TLS separately with `certbot` or another reverse-proxy setup if you want HTTPS |
|
|
- this script sets up **HTTP only**; add TLS separately with `certbot` or another reverse-proxy setup if you want HTTPS |
|
|
- if you prefer MySQL instead of SQLite, update `.env` and the script before rerunning it |
|
|
|
|
|
|
|
|
- if you prefer MySQL instead of SQLite, update `.env` and the script before rerunning it |