Setting up for development
You can start developing using docker or you can set up manually.
Using docker
There is a sample docker-compose.yml in the repo so reusing the sample is the easiest way to set up the local dev environment. Here you can find the file. This tutorial uses the sample file (this tutorial is for Ubuntu 22.04 ).
Set up the required software and Node.js
$ sudo apt-get install curl build-essential python3 pip
$ curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash
$ source ~/.bashrc
$ nvm install v20.7.0
$ nvm use v20.7.0
Clone the repo and prepare libraries
$ git clone https://github.com/cloverstudio/Spika3.git
$ cd Spika3
$ npm install
$ cp .env-sample .env
Then you have to install the docker. Please check it out here, and install the docker and docker-compose. https://docs.docker.com/engine/install/ubuntu/
Set up the docker-compose.yml and start containers.
mv docker-compose.yml.sample docker-compose.yml
#change if you need..
nano docker-compose.yml
#update .env to use the docker-compose config
nano .env
Build the frontend and start the server.
$ npx prisma migrate dev
# Build web clients
$ npm run build:management
$ npm run build:messenger
# Start server
$ npm run start:server
Manually
Set up the required software and Node.js
$ sudo apt-get install curl build-essential python3 pip
$ curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash
$ source ~/.bashrc
$ nvm install v20.7.0
$ nvm use v20.7.0
Set up MySQL, RabbitMQ, Redis
Click here for instructions for installing MySQL in Ubuntu 20.04.
Click here for instructions for installing RabbitMQ in Ubuntu 20.04.
Install the Redis server
$ sudo apt install redis-server
Clone the repo and prepare libraries
$ git clone https://github.com/cloverstudio/Spika3.git
$ cd Spika3
$ npm install
$ cp .env-sample .env
Build the frontend and start the server.
$ npx prisma migrate dev
# Build web clients
$ npm run build:management
$ npm run build:messenger
# Start server
$ npm run start:server
Developing backend
$ npm run dev:server
Developing frontend
$ npm run dev:messenger
Developing management
$ npm run dev:management