From 304106af48112ce3588b07c1ab0238d3bf36bea1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Lalinsk=C3=BD?= Date: Sun, 7 May 2023 09:21:30 +0200 Subject: [PATCH] Rewrite README --- README.md | 71 ++++++++++++++++++------------------------------------- 1 file changed, 23 insertions(+), 48 deletions(-) diff --git a/README.md b/README.md index 9a5c139c..9956ed29 100644 --- a/README.md +++ b/README.md @@ -4,72 +4,47 @@ AcoustID Server This software is only meant to run on [acoustid.org](https://acoustid.org). Running it on your own server is not supported. It's possible, but you need to understand the system well enough and even then it's probably not going to be useful to you. -Installation ------------- +Local Development +----------------- -On Ubuntu you can install all dependencies using the following commands (as root): +You need Python 3.8 or newer to run the code. On Ubuntu, you can install the required +packages using the following command: - sudo apt-get install python python-dev python-virtualenv + sudo apt-get install python3 python3-dev python3-venv -Start the required services using Docker: +Setup Python virtual environment: - docker-compose up -d + python3 -m venv venv + source venv/bin/activate -If you can't use Docker, you will need to install PostgreSQL and Redis from packages: + export PYTHONPATH=`pwd` - sudo apt-get install postgresql postgresql-contrib - sudo apt-get install redis-server + pip install -r requirements.txt + pip install -r requirements_dev.txt -And you will also neeed to compile the [pg\_acoustid](https://bitbucket.org/acoustid/pg_acoustid) extension yourself. It's easier to use the ready-made Docker images. +Start the required services using Docker: -Setup Python virtual environment: + export COMPOSE_DOCKER_CLI_BUILD=1 + export DOCKER_BUILDKIT=1 + export COMPOSE_FILE=docker-compose.yml:docker-compose.localhost.yml - virtualenv e - source e/bin/activate - pip install -r requirements.txt - pip install -r requirements_dev.txt + docker-compose up -d redis postgres index Prepare the configuration file: cp acoustid.conf.dist acoustid.conf vim acoustid.conf -Create the PostgreSQL database: - - sudo -u postgres createuser acoustid - sudo -u postgres createdb -O acoustid acoustid - -Install extensions into the newly created database: - - sudo -u postgres psql acoustid -c 'CREATE EXTENSION intarray;' - sudo -u postgres psql acoustid -c 'CREATE EXTENSION pgcrypto;' - sudo -u postgres psql acoustid -c 'CREATE EXTENSION acoustid;' +Initialize the local database: -Create the database structure: - - ./run_psql.sh