OS compatibility (tested with Python >= 3.7.3):
- Debian:
- Buster (10)
- Bullseye (11)
- Ubuntu:
- Bionic (18.04)
- Focal (20.04)
Older versions of Debian (8, 9) and Ubuntu (16.04) should work as long as a python version >= 3.7 is used.
To install the backend, you have two options:
Ensure your shell has an UTF-8 locale.
echo $LANG
should return a string like en_EN.UTF-8
.
Run the script:
./setup_default_backend.sh
This script runs the backend with a simple default configuration: development.ini
configuration file. It uses the default config file, sqlite database, etc.
This script uses sudo, make sure it is installed and configured. Alternatively, you can use it under root:
./setup_default_backend.sh root
For each missing configuration file, this script will generate them from the default configuration. If the default SQLite database is missing, the script will generate it. This script may also be used for updates. To update a script generated by the Tracim installation, update the source code with git pull and rerun the same script to update the database model, the system and Python dependencies.
In some case, you may want to not install some dependencies.
For example, if you are using arm64:
IGNORE_FULL_PREVIEW_GENERATOR=1 ./setup_default_backend.sh
Here is the list of every option:
IGNORE_FULL_PREVIEW_GENERATOR
: ignore the installation of the full preview generator.IGNORE_APT_INSTALL
: ignore the installation of the dependencies with apt-get.DONT_GENERATE_PYENV
: don't generate the.pyenv
directory.
For more information about configuring the backend, see Backend README. For more information about the configuration files, see development.ini.sample and the backend setting documentation.
See the Backend README.
To install the backend, you need to install the following dependencies:
sudo apt update
xargs sudo apt install < system_packages/debian/build_backend_packages.list
xargs sudo apt install < system_packages/debian/run_backend_packages.list
Additionally, you can install the preview dependencies for a better preview support (LibreOffice, Inkscape, FFmpeg,...):
sudo apt install system_packages/debian/optional_preview_packages.list
To use TracimCLI, you need to be in a Python virtual environment.
To do so, you firstly need to create a Python virtual environment:
python3 -m venv env
Then activate it in your terminal session:
source env/bin/activate
Note: Every Tracim command execution must be executed under this virtual environment.
Install packaging tools:
pip install -r requirements-build.txt
(Optional) Install strict supported version of dependencies with requirement.txt:
pip install -r requirements.txt
(Optional) Install all preview builders to be able to generate preview for most file formats:
pip install -r requirements-full-preview-generator.txt
Install the project in editable mode with its develop requirements:
pip install -r requirements-test.txt
pip install -e "."
If you want to use PostgreSQL, database engine instead of the default one (SQLite bundled with python), you need to install the python driver for those databases that are supported by SQLAlchemy.
For PostgreSQL, those are shortcuts to install Tracim with test and specific driver.
For PostgreSQL:
pip install -r requirements-db-postgres.txt
If you want to store files on s3, you need to install the S3 driver:
pip install -r requirements-storage-s3.txt
To install the frontend dependencies, all you have to do is to run the script:
./install_frontend_dependencies.sh
This script uses sudo. Make sure it is installed and configured. Alternatively, under root:
./install_frontend_dependencies.sh root
Then, you can build the frontend:
./build_full_frontend.sh
You may want to build only an application and not the whole frontend.
To do so, you will have to build the application by moving into the application folder.
If you want to build frontend
:
cd frontend
./build_frontend.sh
If you want to build frontend_app_<any_app>
cd frontend_app_agenda
./build_app.sh
If you want to build frontend_lib
:
cd frontend_lib
./build_frontend_lib.sh
On top of that there is an option -d
to build the frontend in development mode:
./build_full_frontend.sh -d
This allow to faster builds and better debugging.
To run the development server, accessible at localhost:7999, you have to run the script:
./run_dev_backend.sh