Second, you install the development dependencies such as installing postgres and redis inside WSL2.
$ sudo apt install libsasl2-dev python3-dev libldap2-dev libssl-dev gcc make rsync
$ sudo apt install postgresql postgresql-server-dev-14 postgresql-client redis
$ sudo service postgresql start
$ sudo service postgresql status
$ sudo service redis-server start
$ sudo service redis-server status
$ sudo sed -i -e 's/.*max_locks_per_transaction.*/max_locks_per_transaction = 1024 # min 10/' /etc/postgresql/14/main/postgresql.conf
$ sudo service postgresql restart
Create a postgres user varfish
with password varfish
and a database.
$ sudo -u postgres createuser -s -r -d varfish -P
[enter varfish as password]
$ sudo -u postgres createdb --owner=varfish varfish
Create a miniconda3 installation with an environment
$ mkdir -p Development Downloads
$ cd Downloads
$ wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
$ bash Miniconda3-latest-Linux-x86_64.sh -b -p ~/miniconda3
$ source ~/miniconda3/bin/activate
$ conda install -y mamba
$ mamba create -y -n varfish-server python==3.9 nodejs=12
$ conda activate varfish-server
Finally, checkout varfish-server
and create a development .env
file:
$ cd ~/Development
$ git clone [email protected]:bihealth/varfish-server.git
$ cat <<"EOF" >.env
export VARFISH_ENABLE_SPANR_SUBMISSION=1
export VARFISH_ENABLE_CADD_SUBMISSION=1
export VARFISH_ENABLE_SPANR_SUBMISSION=1
export VARFISH_ENABLE_SVS=1
export DJANGO_SETTINGS_MODULE=config.settings.local
export DJANGO_SECURE_SSL_REDIRECT=0
export DJANGO_SECRET_KEY="0Vabi8RKYcSgVTGhr23AlIFA5D1aXh25ZBvxXi9Tgu9UrrFdiolaQchS9k7CfqIMev7KoLV2RH84XxQDcDCmIoeyVmMmNUh7jE8N"
export DATABASE_URL="postgres://varfish:[email protected]/varfish"
export VARFISH_ENABLE_BEACON_SITE=1
export FIELD_ENCRYPTION_KEY=_XRAzgLd6NHj8G4q9FNV0p3Um9g4hy8BPBN-AL0JWO0=
EOF
$ make test-noselenium