updating readme

This commit is contained in:
Kibi Kelburton 2024-02-22 01:41:33 +01:00
parent 52c9b8274a
commit 87a47efe68

View File

@ -1,8 +1,6 @@
# w0bm.com
![w0bm](https://i.imgur.com/hPvnspu.png "w0bm logo")
### I don't give support on this software, you are free to do whatever the FUCK you like but don't expect me to help you with php trouble that you are going to encounter unless you know what you are doing, the times are over where you could install this with ease, just saying.
[![IRC Chat](https://img.shields.io/badge/chat-irc-green.svg)](https://n0xy.net/webirc?join=%23w0bm)
[![License](https://poser.pugx.org/laravel/framework/license.svg)](https://packagist.org/packages/laravel/framework)
@ -17,11 +15,19 @@ The page is build on top of the [Laravel Framework](https://laravel.com).
# Dependencies
Our prefered distribution is Arch Linux, so all of the commands will be for Arch Linux and can be modified for the distro of your choice, the names of the packages may be different.
`sudo pacman -S php php-fpm composer mariadb nginx ffmpeg imagemagick npm`
**w0bm will run with PHP ≥5.6 - PHP ≤7.1**
w0bm requires PHP 7.1.x to work!
It is well-tested with PHP 7.1
w0bm is not able to install correctly on your machine if you have PHP 7.3.x or above at this time!
To get PHP 7.1 you can use the packages provided in the AUR!
To access the AUR you can use a AUR helper such as yay
https://github.com/Jguer/yay
`yay -S php71 php71-{cli,ctype,curl,fileinfo,fpm,gd,iconv,mysql,opcache,pdo,phar,tokenizer,zip,json,mbstring,dom} composer mariadb nginx ffmpeg imagemagick npm vim sudo`
You need to downgrade composer with `sudo composer self-update --2.2`
The vendor.zip needs to be extracted in the w0bm root directory into the `vendor/` directory
@ -33,7 +39,7 @@ Before you can get started you need to set up mariadb, nginx and php.
Set up mariadb (assuming you don't already have a database running)
```mysql_install_db --user=mysql --basedir=/usr --datadir=/var/lib/mysql```
```mariadb_install_db --user=mysql --basedir=/usr --datadir=/var/lib/mysql```
After that you can start the database server, you can also directly enable the service so it starts automatically if your system needs a reboot for exmaple.
@ -43,7 +49,7 @@ After that you can start the database server, you can also directly enable the s
Now you can log into your freshly installed database, the user root doesn't have a password, so just issue the command below and hit enter when it asks you for a password.
```mysql -u root -p```
```sudo mysql -u root -p```
Now create the actual database and the user for it
@ -55,19 +61,18 @@ GRANT ALL ON w0bm.* TO w0bm@localhost IDENTIFIED BY 'w0bm';
## PHP/PHP-FPM
Open the php config file
```sudo nvim /etc/php/php.ini```
```sudo nvim /etc/php71/php.ini```
and edit the following settings
<pre>
post_max_size = 500M
upload_max_filesize = 100M
extension=pdo_mysql.so
</pre>
Then edit the php-fpm config file
```sudo nvim /etc/php/php-fpm.d/www.conf```
```sudo nvim /etc/php71/php-fpm.d/www.conf```
Change the default user/group to the user who owns the w0bm directory, we run w0bm as w0bm.
@ -79,7 +84,7 @@ group = w0bm
Next set up php-fpm to use a unix sock.
<pre>
listen = /run/php-fpm/php-fpm.sock
listen = /run/php71-fpm/php-fpm.sock
listen.owner = w0bm
listen.group = w0bm
</pre>
@ -154,47 +159,27 @@ server {
}
}
#CDN Configuration
server {
listen 80;
listen [::]:80;
server_name b.w0bm.com v4.b.w0bm.com;
return 301 https://$server_name$request_uri;
large_client_header_buffers 4 32k;
return 301 https://b.w0bm.com$request_uri;
}
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name b.w0bm.com;
access_log /var/log/nginxw0bm/cdn-access.log;
error_log /var/log/nginx/w0bm/cdn-error.log;
root /home/w0bm/w0bm.com/public/b;
ssl on;
ssl_certificate /path/to/your/cert.pem;
ssl_certificate_key /path/to/your/key.pem;
large_client_header_buffers 4 32k;
}
</pre>
# Installation
`git clone https://gitfap.de/w0bm/w0bm.com.git`
`git clone gitea@git.lat:w0bm/w0bm.git`
`cd w0bm.com`
`./composer.phar dump-autoload`
`php71 composer dump-autoload`
`./composer.phar install --no-scripts`
`php71 composer install --no-scripts`
(You will most likely encounter a issue where 2 packages namely: visitor and captcha require at least php 7.2, to get around this just change the value to 7.1 in the composer.lock file)
(make sure you have enough RAM for the installation, otherwise use swap)
`touch .env`
`php artisan key:generate`
`php71 artisan key:generate`
`nvim .env`
`vim .env`
<pre>
APP_KEY=
APP_ENV=production
@ -221,11 +206,11 @@ Now put some random webm in the folder and name it `1.webm`
Modify `database/seeds/DatabaseSeeder.php` and uncomment all the different seeders. (Initially you'll need all)
Run `php artisan migrate` and then `php artisan db:seed`
Run `php71 artisan migrate` and then `php71 artisan db:seed`
Run `php artisan tags` to initially tag all videos
Run `php71 artisan tags` to initially tag all videos
Start the development server with `php artisan serve`
Start the development server with `php71 artisan serve`
Check your website at `http://localhost:8000/1`
@ -237,7 +222,7 @@ To transpile and minify your modified w0bmscript.js you need to have this projec
Make your changes, test them locally (PLEASE!!! preferable write some unit tests aswell) and make a pull request.
Folder structure:
Folder structure:
- Models: `app/Models/`
- Routes: `app/Http/routes.php`
- Controllers: `app/Http/Controllers`
@ -250,3 +235,4 @@ Folder structure:
The Laravel framework is open-sourced software licensed under the [MIT license](http://opensource.org/licenses/MIT)
The w0bm.com Logo is copyrighted by w0bm.com and property of w0bm.com