Support #966
Updated by Daniel Curtis about 3 years ago
This is a guide for installing Mealie on Debian. Using the officially supported Docker image will likely be easier, this is just fun.
h2. Prepare the Environment
* Make sure the system is up to date:
<pre>
apt update && apt upgrade
</pre>
* Install some prerequisites:
<pre>
apt install nodejs npm python3 python3-dev python3-venv python3-pip python3-cryptography git curl build-essential libpq-dev libwebp-dev libsasl2-dev libldap2-dev libssl-dev gnupg gnupg2 gnupg1 debian-keyring debian-archive-keyring apt-transport-https libbluetooth-dev libbz2-dev libc6-dev libexpat1-dev libffi-dev libgdbm-dev liblzma-dev libncursesw5-dev libreadline-dev libsqlite3-dev libssl-dev libxslt1-dev libxml2-dev libjpeg-dev make tk-dev uuid-dev wget xz-utils zlib1g-dev rustc
</pre>
* Create a user for mealie:
<pre>
useradd -U -s /bin/bash mealie
mkdir /home/mealie
chown mealie:mealie /home/mealie/
su - mealie
</pre>
* Set a few environment variables:
<pre>
echo 'export PYTHONUNBUFFERED=1 ' >> ~/.bashrc
echo 'export PYTHONDONTWRITEBYTECODE=1' >> ~/.bashrc
echo 'export PIP_NO_CACHE_DIR=off' >> ~/.bashrc
echo 'export PIP_DISABLE_PIP_VERSION_CHECK=on' >> ~/.bashrc
echo 'export PIP_DEFAULT_TIMEOUT=100' >> ~/.bashrc
echo 'export POETRY_HOME="/home/mealie/poetry"' >> ~/.bashrc
echo 'export POETRY_VIRTUALENVS_IN_PROJECT=true' >> ~/.bashrc
echo 'export POETRY_NO_INTERACTION=1' >> ~/.bashrc
echo 'export PYSETUP_PATH="/home/mealie/pysetup"' >> ~/.bashrc
echo 'export VENV_PATH="/home/mealie/poetry/venv"' >> ~/.bashrc
</pre>
* Install python poetry:
<pre>
mkdir ~/poetry
curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/install-poetry.py | python3 -
</pre>
* Add local bin execution path:
<pre>
echo 'export PATH="/home/mealie/poetry/bin:/home/mealie/.venv:$PATH"' >> ~/.bashrc
source ~/.bashrc
</pre>
h2. Install Mealie
* Download mealie:
<pre>
mkdir ~/git && cd ~/git
git clone https://github.com/hay-kot/mealie.git
</pre>
h3. Frontend
* Setup the frontend directory:
<pre>
mkdir ~/frontend && cd ~/frontend
cp cp ~/git/mealie/frontend/package*.json .
npm install
cp -r ~/git/mealie/frontend/* .
npm run build
</pre>
h3. Backend
* Create and prep a temporary build directory:
<pre>
mkdir ~/pysetup && cd ~/pysetup
cp ~/git/mealie/poetry.lock .
cp ~/git/mealie/pyproject.toml .
</pre>
* Build mealie venv:
<pre>
poetry install -E pgsql --no-dev
</pre>
* Build mealie backend:
<pre>
cd ~/git/mealie
sh poetry/venv/bin/activate
poetry install
</pre>
h2. Resources
* https://github.com/hay-kot/mealie
* https://hay-kot.github.io/mealie/contributors/developers-guide/starting-dev-server/
* https://hay-kot.github.io/mealie/documentation/getting-started/install/