git clone https://github.molgen.mpg.de/mariux64/paperless-baremetal
cd paperless-baremetal
./buildall
# new BUILD_TAG 2.4.0: edit build.local
./buildall
. build.profile
cd $PREFIX
./startstop-paperless.sh start
echo "URL: ${PAPERLESS_URL}:${PAPERLESS_PORT}"
after successfully building:
OLD="${HOME}/paperless-server/2.8.6"
NEW="${HOME}/paperless-server/2.9.0"
# stop running instance
cd "$OLD"
./startstop.sh stop
# remove empty database and media
rm -rf "$NEW/data" "$NEW/media"
# change to new installation folder
cd "$NEW"
# copy old data to new location ( $PREFIX )
cp -ax "$OLD/data" "$NEW/"
cp -ax "$OLD/media" "$NEW/"
# start
./startstop.sh start
# check status
./startstop.sh status
Overall, this script automates the setup of a local development environment for the paperless project, handling configuration, directory creation, and the building of dependencies. It also sets up logging to keep track of the build process.
This bash script is designed to set up a local build environment for "paperless-ngx".
When started first it creates a default configuration file build.local
with various configuration settings for the project. You'll find the auto generated secrets inside.
Then it loads the build.profile
file, which contains additional configuration or environment variables.
The mkdir -vp
commands create various directories with specified permissions if they don't already exist. These directories are used for configuration, temporary files, and caches.
Logging for the build process: It sets a LOGS variable to a logs directory in the current working directory.
It attempts to create a new log file with a unique name based on the current date and a counter to avoid overwriting existing files.
logs/build.log
: This is a symbolic link to the latest log file, making it easier to access.
The script then runs several other scripts in a subshell { ... }, redirecting all output to the log file using tee.
These scripts are responsible for building various components of the paperless project, such as the database (SQLite), Python environment, Node.js, and other dependencies.
Overall, this script automates the setup of a local development environment for the paperless project, handling configuration, directory creation, and the building of dependencies. It also sets up logging to keep track of the build process.