This README provides instructions for setting up and running the application.
Things you may want to cover:
- System dependencies
This project is designed to be compatible with standard Oracle Linux 9.3 packages and repositories. We are committed to supporting the latest versions of Oracle Linux to the best of our ability. Any updates to the project will ensure compatibility with the newest releases of Oracle Linux.
While Oracle Linux is the recommended environment, you have the flexibility to use any Linux distribution according to your preferences.
-
Ruby version
ruby 3.3.4
-
Bundle version
bundle-2.5.11
If used with WSL2, need to configuure it (you may skip WSL section if not using it).
sudo nano /etc/wsl.conf
Write there:
[boot]
systemd=true
[network]
generateHosts = false
generateResolvConf = false
Reset WSL from windows shell.
wsl.exe --shutdown
Setup DNS.
sudo nano /etc/resolv.conf
Write there:
nameserver 8.8.8.8
Update and needed instruments.
sudo dnf update
sudo dnf config-manager --enable ol9_codeready_builder
sudo dnf install nano git curl gpg gcc make libyaml-devel
Redis.
sudo dnf install redis
sudo systemctl start redis
sudp systemctl enable redis
Install MySQL.
sudo dnf install mysql-server mysql-devel
sudo systemctl start mysqld
sudp systemctl enable mysqld
sudo mysql_secure_installation
Need to create MySQL user. There is 2 ways to do it.
mysql -u root -p
- For socket authentication
INSTALL PLUGIN auth_socket SONAME 'auth_socket.so';
CREATE USER 'cmo'@'localhost' IDENTIFIED WITH auth_socket;
GRANT ALL PRIVILEGES ON *.* TO 'cmo'@'localhost';
FLUSH PRIVILEGES;
exit
- For passwword authentication
CREATE USER 'cmo'@'localhost' IDENTIFIED BY 'YOUR_PASSWORD_GOES_HERE';
GRANT ALL PRIVILEGES ON *.* TO 'cmo'@'localhost';
FLUSH PRIVILEGES;
exit
Configure ENV variables needed for sidekiq and redis.
nano .bashrc
Write there:
export SIDEKIQ_USERNAME="admin"
export SIDEKIQ_PASSWORD="admin"
export CMO_DB_USERNAME="cmo"
export CMO_DB_PASSWORD=""
export CMO_DB_SOCKET="/var/lib/mysql/mysql.sock"
export REDIS_PORT="6379"
Keep password empty if you are using socket, otherwise fill the password and keep empty socket path.
In this example we are using RVM. Install it with:
\curl -sSL https://get.rvm.io | bash -s stable
Install specified Ruby version.
rvm install 3.3.4 --default
Git clone the project. Setup local bundle and install dependencies.
git clone https://github.com/Kagayakashi/cloud_mu_online.git
cd cloud_mu_online/
bundle config set --local path 'vendor/bundle'
bundle install
Setup database.
bin/rails db:create
bin/rails db:migrate
bin/rails db:seed
Run application.
bin/rails s
Run sidekiq.
bundle exec sidekiq