fix: make update runs setup automatically if config is missing
After make uninstall (which wipes config/ and data/), running make update directly failed with "Couldn't find env file: config/mail/mailserver.env" because docker-compose needs the generated config files to exist. make update now checks for the sentinel config file and calls make setup first if it's missing, so uninstall → update works as a valid flow. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -120,6 +120,10 @@ shell-%:
|
|||||||
update:
|
update:
|
||||||
@echo "Pulling latest code..."
|
@echo "Pulling latest code..."
|
||||||
git pull
|
git pull
|
||||||
|
@if [ ! -f config/mail/mailserver.env ]; then \
|
||||||
|
echo "Config missing — running setup first..."; \
|
||||||
|
$(MAKE) setup; \
|
||||||
|
fi
|
||||||
@echo "Rebuilding and restarting services..."
|
@echo "Rebuilding and restarting services..."
|
||||||
PUID=$$(id -u) PGID=$$(id -g) $(DC) up -d --build
|
PUID=$$(id -u) PGID=$$(id -g) $(DC) up -d --build
|
||||||
@echo "Update complete. Run 'make status' to verify."
|
@echo "Update complete. Run 'make status' to verify."
|
||||||
|
|||||||
Reference in New Issue
Block a user