updated readme
This commit is contained in:
parent
dcf5c9a8ac
commit
d5747a8a52
112
README.md
112
README.md
@ -46,7 +46,7 @@
|
|||||||
|
|
||||||
### Built With
|
### Built With
|
||||||
|
|
||||||
- 
|
- 
|
||||||
- 
|
- 
|
||||||
- 
|
- 
|
||||||
|
|
||||||
@ -56,11 +56,117 @@ OurSpace is meant to be easy to set up and run on your own server. Below are the
|
|||||||
|
|
||||||
### Prerequisites
|
### Prerequisites
|
||||||
|
|
||||||
TODO: write this
|
To use OurSpace we need to have installed PHP 8.2 or later and Redis. We can install them in a Debian-based system with the following commands:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
sudo apt update
|
||||||
|
sudo apt install nginx mysql-server php php-fpm php-mbstring php-xml php-bcmath php-curl php-redis redis nginx zip unzip composer nodejs npm
|
||||||
|
```
|
||||||
|
|
||||||
|
Now, enable nginx, mysql and php-fom services:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
sudo systemctl enable --now nginx mysql php-fpm redis-server
|
||||||
|
```
|
||||||
|
|
||||||
|
Create a database for OurSpace:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
mysql
|
||||||
|
CREATE DATABASE ourspace;
|
||||||
|
CREATE USER 'ourspace_user'@'localhost' IDENTIFIED BY 'password';
|
||||||
|
GRANT ALL ON ourspace.* TO 'ourspace_user'@'localhost';
|
||||||
|
FLUSH PRIVILEGES;
|
||||||
|
EXIT;
|
||||||
|
```
|
||||||
|
|
||||||
### Installation
|
### Installation
|
||||||
|
|
||||||
TODO: Write this
|
Once you have all the required software installed and the database created, you can proceed to install OurSpace. First, clone the repository:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cd /var/www/html
|
||||||
|
git clone https://github.com/0xd011f4ce/OurSpace
|
||||||
|
```
|
||||||
|
|
||||||
|
Now, edit the `.env` file with your database, redis, and mail credentials. You can copy the `.env.example` file to `.env` and edit it with your favourite text editor.
|
||||||
|
|
||||||
|
Install all the dependencies:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
composer install
|
||||||
|
npm install
|
||||||
|
```
|
||||||
|
|
||||||
|
Now, create the key and run the migrations:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
php artisan key:generate
|
||||||
|
php artisan migrate
|
||||||
|
```
|
||||||
|
|
||||||
|
Build the styles:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
npm run build
|
||||||
|
```
|
||||||
|
|
||||||
|
Give the proper permissions:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
chown -R www-data:www-data /var/www/html/OurSpace
|
||||||
|
chmod -R 755 /var/www/html/OurSpace
|
||||||
|
```
|
||||||
|
|
||||||
|
Finally, create a virtual host for OurSpace. You can create a file in `/etc/nginx/sites-available/ourspace` with the following content:
|
||||||
|
|
||||||
|
```nginx
|
||||||
|
server {
|
||||||
|
listen 80;
|
||||||
|
server_name ourspace.lat;
|
||||||
|
root /var/www/html/OurSpace/public;
|
||||||
|
|
||||||
|
add_header X-Frame-Options "SAMEORIGIN";
|
||||||
|
add_header X-XSS-Protection "1; mode=block";
|
||||||
|
add_header X-Content-Type-Options "nosniff";
|
||||||
|
|
||||||
|
index index.html index.htm index.php;
|
||||||
|
|
||||||
|
charset utf-8;
|
||||||
|
|
||||||
|
location / {
|
||||||
|
try_files $uri $uri/ /index.php?$query_string;
|
||||||
|
}
|
||||||
|
|
||||||
|
location = /favicon.ico { access_log off; log_not_found off; }
|
||||||
|
location = /robots.txt { access_log off; log_not_found off; }
|
||||||
|
|
||||||
|
error_page 404 /index.php;
|
||||||
|
|
||||||
|
location ~ \.php$ {
|
||||||
|
fastcgi_pass unix:/var/run/php/php8.1-fpm.sock;
|
||||||
|
fastcgi_index index.php;
|
||||||
|
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
|
||||||
|
include fastcgi_params;
|
||||||
|
}
|
||||||
|
|
||||||
|
location ~ /\.(?!well-known).* {
|
||||||
|
deny all;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
Enable the config:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
sudo ln -s /etc/nginx/sites-available/ourspace.conf /etc/nginx/sites-enabled/
|
||||||
|
```
|
||||||
|
|
||||||
|
Restart nginx:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
sudo systemctl restart nginx
|
||||||
|
```
|
||||||
|
|
||||||
## TODO:
|
## TODO:
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
<link rel="icon" href="/resources/img/favicon.ico" type="image/x-icon">
|
<link rel="icon" href="/resources/img/favicon.ico" type="image/x-icon">
|
||||||
|
|
||||||
@vite(["/resources/css/app.css"])
|
@vite(["resources/css/app.css"])
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user