Private
Public Access
Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b0d62c91f8 | ||
|
|
2068df471f |
No files matched your search
+6
-1
@@ -201,7 +201,12 @@ for unit in evection-gunicorn evection-celery-worker evection-celery-beat; do
|
||||
"$APP_DIR/docs/deploy/${unit}.service" > "/etc/systemd/system/${unit}.service"
|
||||
done
|
||||
systemctl daemon-reload
|
||||
systemctl enable --now evection-gunicorn evection-celery-worker evection-celery-beat
|
||||
systemctl enable evection-gunicorn evection-celery-worker evection-celery-beat
|
||||
# Not "enable --now": that only starts a service if it's stopped, so a
|
||||
# re-run after a unit file changed (e.g. a new EVECTION_GUNICORN_BIND)
|
||||
# would reload the daemon but leave the already-running process on its
|
||||
# stale old ExecStart indefinitely. Always restart explicitly instead.
|
||||
systemctl restart evection-gunicorn evection-celery-worker evection-celery-beat
|
||||
|
||||
echo
|
||||
echo "==> Services installed. Checking status..."
|
||||
|
||||
+10
-1
@@ -112,7 +112,16 @@ HEALTH_PORT="${HEALTH_BIND##*:}"
|
||||
if [ "$HEALTH_HOST" = "0.0.0.0" ]; then
|
||||
HEALTH_HOST="127.0.0.1"
|
||||
fi
|
||||
if curl -sf "http://$HEALTH_HOST:$HEALTH_PORT/health/" >/dev/null; then
|
||||
# Use the venv's own Python rather than curl — curl isn't guaranteed to be
|
||||
# installed on a minimal host, but the venv obviously already is.
|
||||
if "$VENV_DIR/bin/python" -c "
|
||||
import sys, urllib.request
|
||||
try:
|
||||
urllib.request.urlopen('http://$HEALTH_HOST:$HEALTH_PORT/health/', timeout=5)
|
||||
except Exception as e:
|
||||
print(e, file=sys.stderr)
|
||||
sys.exit(1)
|
||||
"; then
|
||||
echo "Health check OK"
|
||||
else
|
||||
echo "Health check FAILED — check: journalctl -u evection-gunicorn -n 50" >&2
|
||||
|
||||
Reference in new issue
Block a user