Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
731e9ac58c |
@@ -73,9 +73,9 @@ The `deploy` script uses rsync to push to YunoHost:
|
|||||||
|
|
||||||
**Important deployment notes:**
|
**Important deployment notes:**
|
||||||
- Files in `data/` must be owned by the web server user (`my_webapp__2`) for PHP to write to them
|
- Files in `data/` must be owned by the web server user (`my_webapp__2`) for PHP to write to them
|
||||||
- If deploying with `--reset-data`, the uploaded files get admin ownership - the web server then can't edit them
|
- Using `--reset-data` uploads files as admin — you must fix ownership afterward (the script shows the command)
|
||||||
- Fix with: `sudo chown my_webapp__2:my_webapp__2 /var/www/my_webapp__2/www/data/inventory.json`
|
- If edits aren't saving, check ownership with `ls -la` and fix with:
|
||||||
- Adding admin to the my_webapp__2 group allows the deploy script to write while keeping web server access
|
`sudo chown -R my_webapp__2:my_webapp__2 /var/www/my_webapp__2/www/data/`
|
||||||
|
|
||||||
## Key Implementation Details
|
## Key Implementation Details
|
||||||
|
|
||||||
|
|||||||
4
deploy
4
deploy
@@ -16,6 +16,10 @@ if [ "$1" = "--reset-data" ]; then
|
|||||||
echo "Pushing local data to server..."
|
echo "Pushing local data to server..."
|
||||||
rsync -avz --no-t --no-p \
|
rsync -avz --no-t --no-p \
|
||||||
data/ ${HOST}:${DIR}/data/
|
data/ ${HOST}:${DIR}/data/
|
||||||
|
echo ""
|
||||||
|
echo "*** Data pushed. Fix ownership so the web server can write: ***"
|
||||||
|
echo " ssh ${HOST} \"sudo chown -R my_webapp__2:my_webapp__2 ${DIR}/data/\""
|
||||||
|
echo ""
|
||||||
else
|
else
|
||||||
echo "Pulling data from server..."
|
echo "Pulling data from server..."
|
||||||
mkdir -p data
|
mkdir -p data
|
||||||
|
|||||||
Reference in New Issue
Block a user