Build and run server
- Install PostgreSQL:
sudo apt-get install postgresql postgresql-contrib
# set `default_text_search_config = 'pg_catalog.russian'`
sudo nano /etc/postgresql/14/main/postgresql.conf
sudo systemctl start postgresql.service
sudo -u postgres createuser -P --interactive
- Install RUM:
sudo apt-get install systemtap-sdt-dev postgresql-server-dev-14
git clone https://github.com/postgrespro/rum
cd rum
make USE_PGXS=1
make USE_PGXS=1 install
- Install the latest release of go-swagger:
wget https://github.com/go-swagger/go-swagger/releases/download/v0.30.5/swagger_linux_amd64
sudo mv swagger_linux_amd64 /usr/bin/swagger
- Install Go:
sudo snap install go --classic
- Clone mindwell-server:
mkdir -p ~/go/src
cd ~/go/src
git clone https://github.com/sevings/mindwell-server.git
cd mindwell-server
- Generate code:
./scripts/generate.sh
- Create DB:
psql -c 'create database mindwell'
psql -d mindwell -q -f scripts/mindwell.sql
- Configure:
cp configs/server.sample.toml configs/server.toml
nano configs/server.toml
- Run tests:
go test ./test/ --failfast
- Run server:
go run ./cmd/mindwell-server/ --port 8000
Build and run images
- Install dependencies:
sudo apt-get install libvips-dev
- Configure:
cp configs/images.sample.toml configs/images.toml
nano configs/images.toml
- Run images:
go run ./cmd/mindwell-images-server/ --port 8888