Private
Public Access
Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
78611c0eae | ||
|
|
50d2ba9404 |
No files matched your search
+5
-3
@@ -55,7 +55,8 @@ and 4 below first — prerequisites and what `.env` controls.
|
|||||||
|
|
||||||
## 1. Prerequisites
|
## 1. Prerequisites
|
||||||
|
|
||||||
- Python 3.11 or 3.12
|
- Python 3.11 or 3.12, with its `venv` module (Debian/Ubuntu split this into a
|
||||||
|
separate `python3.X-venv` package — see below)
|
||||||
- Redis (Celery's broker)
|
- Redis (Celery's broker)
|
||||||
- **Postgres only**: a PostgreSQL server (12+) and its client headers if you're not
|
- **Postgres only**: a PostgreSQL server (12+) and its client headers if you're not
|
||||||
using the bundled `psycopg[binary]` wheel (most platforms are covered by the wheel,
|
using the bundled `psycopg[binary]` wheel (most platforms are covered by the wheel,
|
||||||
@@ -63,10 +64,11 @@ and 4 below first — prerequisites and what `.env` controls.
|
|||||||
- nginx (or another reverse proxy)
|
- nginx (or another reverse proxy)
|
||||||
- A domain name pointed at the host, if you want this reachable outside your LAN
|
- A domain name pointed at the host, if you want this reachable outside your LAN
|
||||||
|
|
||||||
Debian/Ubuntu example for the non-Python pieces:
|
Debian/Ubuntu example for the non-Python pieces (swap `python3.13-venv` for
|
||||||
|
whatever `python3 --version` reports on your system):
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
sudo apt install redis-server nginx
|
sudo apt install redis-server nginx python3.13-venv
|
||||||
# Postgres only:
|
# Postgres only:
|
||||||
sudo apt install postgresql
|
sudo apt install postgresql
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -26,6 +26,13 @@ VENV_DIR="$EVECTION_HOME/venv"
|
|||||||
EVECTION_USER="${EVECTION_USER:-evection}"
|
EVECTION_USER="${EVECTION_USER:-evection}"
|
||||||
PYTHON_BIN="${PYTHON_BIN:-python3}"
|
PYTHON_BIN="${PYTHON_BIN:-python3}"
|
||||||
|
|
||||||
|
# $APP_DIR ends up owned by $EVECTION_USER (see below), but the git steps
|
||||||
|
# in this script run as root — without this, git refuses to touch a repo
|
||||||
|
# it doesn't own ("detected dubious ownership"), which is exactly what
|
||||||
|
# happens re-running this script after a previous run got far enough to
|
||||||
|
# chown the checkout.
|
||||||
|
git config --global --add safe.directory "$APP_DIR"
|
||||||
|
|
||||||
echo "==> Installing Evection"
|
echo "==> Installing Evection"
|
||||||
echo " App directory: $APP_DIR"
|
echo " App directory: $APP_DIR"
|
||||||
echo " Service user: $EVECTION_USER"
|
echo " Service user: $EVECTION_USER"
|
||||||
@@ -45,6 +52,11 @@ if [ "$PY_MAJOR" -lt 3 ] || { [ "$PY_MAJOR" -eq 3 ] && [ "$PY_MINOR" -lt 11 ]; }
|
|||||||
echo "Python $PY_VERSION found, but Evection needs 3.11 or newer." >&2
|
echo "Python $PY_VERSION found, but Evection needs 3.11 or newer." >&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
if ! "$PYTHON_BIN" -c 'import ensurepip' >/dev/null 2>&1; then
|
||||||
|
echo "'$PYTHON_BIN' can't create virtualenvs (no ensurepip) — on" \
|
||||||
|
"Debian/Ubuntu, install it with: apt install python${PY_VERSION}-venv" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
for bin in redis-cli nginx; do
|
for bin in redis-cli nginx; do
|
||||||
if ! command -v "$bin" >/dev/null 2>&1; then
|
if ! command -v "$bin" >/dev/null 2>&1; then
|
||||||
|
|||||||
@@ -28,6 +28,11 @@ VENV_DIR="$EVECTION_HOME/venv"
|
|||||||
EVECTION_USER="${EVECTION_USER:-evection}"
|
EVECTION_USER="${EVECTION_USER:-evection}"
|
||||||
SOCKET="/run/evection/gunicorn.sock"
|
SOCKET="/run/evection/gunicorn.sock"
|
||||||
|
|
||||||
|
# $APP_DIR is owned by $EVECTION_USER, but the git steps below run as
|
||||||
|
# root — without this, git refuses to touch a repo it doesn't own
|
||||||
|
# ("detected dubious ownership").
|
||||||
|
git config --global --add safe.directory "$APP_DIR"
|
||||||
|
|
||||||
if ! id -u "$EVECTION_USER" >/dev/null 2>&1; then
|
if ! id -u "$EVECTION_USER" >/dev/null 2>&1; then
|
||||||
echo "System user '$EVECTION_USER' doesn't exist — is Evection installed?" \
|
echo "System user '$EVECTION_USER' doesn't exist — is Evection installed?" \
|
||||||
"Run scripts/install.sh first." >&2
|
"Run scripts/install.sh first." >&2
|
||||||
|
|||||||
Reference in new issue
Block a user