From 39c94473c89a3d91b2e564fd357058a741b61862 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=8Carodej?= Date: Wed, 27 Apr 2022 11:11:50 +0200 Subject: [PATCH] readme edit --- README.md | 159 +----------------------------------------------------- 1 file changed, 1 insertion(+), 158 deletions(-) diff --git a/README.md b/README.md index 2d7f0f05..1cb6c93d 100644 --- a/README.md +++ b/README.md @@ -11,18 +11,10 @@ - [Nginx Configuration](#nginx-configuration) - [Apache Configuration](#apache-configuration) - [Migrating to Another Domain](#migrating-to-another-domain) -- [Broadcasting](#broadcasting) - - [About Broadcasting](#about-broadcasting) - - [Install Broadcast Server](#install-broadcast-server) -- [Subscription Configuration](#subscription-configuration) - - [Configuring Production/Testing Environment](#configuring-productiontesting-environment) - - [Upgrading From Testing Environment to the Production Mode](#upgrading-from-testing-environment-to-the-production-mode) - [Developers](#developers) - [Running Environment On Your Localhost](#running-environment-on-your-localhost) - [Express Installation](#express-installation) - [Express Installation with Demo Data](#express-installation-with-demo-data) - - [Generate Demo Data for Metered Subscription](#generate-demo-data-for-metered-subscription) - - [Generate Demo Data for Fixed Subscription](#generate-demo-data-for-fixed-subscription) - [Sanctum Stateful Domains](#sanctum-stateful-domains) - [Running your Local Server](#running-your-local-server) - [Building Your App for Production](#building-your-app-for-production) @@ -45,6 +37,7 @@ - GD - BCMath - PDO +- PDO_MYSQL - SQLite3 - Ctype - Fileinfo @@ -185,130 +178,6 @@ If you move your VueFileManager application into another domain or subdomain, yo 3. Find `SANCTUM_STATEFUL_DOMAINS` variable and write your new domain location without http protocol. 4. Remove your cached config file which is located `/bootstrap/cache/config.php`. -# Broadcasting -### About Broadcasting -Broadcasting is responsible for real time app experience. If broadcasting is set, you will be able to get just in time updates in your app. - -For example, remote upload works on the background, while the files are downloading and showing in your view immediately after they are ready without refreshing the app. Or, you will get immediately notifications about new events like team invitations, file requests and many more. - -More real time features will be implemented in incoming updates. - -VueFileManager support 2 types of connections: -1. [Pusher](https://pusher.com/) - Suitable for all users and all hosting platforms -2. VueFileManager Broadcast Server - Free of charge, suitable for experienced users, limited for VPS servers - -## Install Broadcast Server -We strongly recommend only for experienced users to set up and running VueFileManager broadcast server. For others, we recommend to use Pusher service to easy set up and host broadcasting service. - -### Server Requirements -**For running app make sure you have:** - -- VPS server with SSH access -- PHP >= 8.0.2 version (8.1+ recommended) -- Nginx -- Supervisor -- Certbot - -### Installation -We assume you have installed and running properly your VPS server. -### Websocket Server Set Up -Upload VueFileManager into your server, for example path directory `/var/www/sockets` would be great. Next connect to your server with ssh and change your terminal directory into VueFileManager: -``` -cd /var/www/sockets -``` -Run installation command for websocket server. You will be prompted to type host of which you want to allow incoming requests. -``` -php artisan websockets:install -``` -### Domain & Nginx Set Up -Create subdomain for your socket host, for example `socket.vuefilemanager.com` and direct this subdomain to your vps where socket server will be running. - -Then, create nginx config for your subdomain: -``` -nano /etc/nginx/sites-available/socket.conf -``` -And paste the template below, just replace subdomain with yours: -``` -server { - listen 80; - server_name socket.vuefilemanager.com; - - location / { - proxy_pass http://127.0.0.1:6001; - proxy_read_timeout 60; - proxy_connect_timeout 60; - proxy_redirect off; - - # Allow the use of websockets - proxy_http_version 1.1; - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection 'upgrade'; - proxy_set_header Host $host; - proxy_cache_bypass $http_upgrade; - } -} -``` -Enable your created config by this command: -``` -ln -s /etc/nginx/sites-available/socket.conf /etc/nginx/sites-enabled/ -``` -Restart your nginx: -``` -systemctl restart nginx -``` -In the last step, install ssl certificate for your previously created subdomain with certbot: -``` -certbot --nginx -``` -### Supervisor Configuration -We need supervisor to manage running your websocket server on the background. -In `/etc/supervisor/conf.d` (Debian/Ubuntu) or `/etc/supervisord.d/` (Red Hat/CentOS) create a file `websockets.conf`. - -Just edit php path, project path and user when they are different for your vps: -``` -[program:websockets] -command=/usr/bin/php /var/www/socket/artisan websockets:serve -numprocs=1 -autostart=true -autorestart=true -user=www-data -``` -Run command below to start your websocket server: -``` -supervisorctl start websockets -``` -Run command below to stop your websocket server: -``` -supervisorctl stop websockets -``` -When you update code or server for some reason, you must also update running supervisor: -``` -supervisorctl reload -``` -### VueFileManager Set Up -Log in to your VueFileManager admin account and go to `Admin / Settings / Environment`. - -Find Broadcasting form and select `VueFileManager` as broadcasting driver. Set your hostname and save the form. - -That's all, you are running your own Broadcast server. - - -# Subscription Configuration - -## Configuring Production/Testing Environment -To set up your subscription, please follow these steps below. -1. If you didn't set up your subscription type in Setup Wizard, go to the `Admin / Settings / Application` and find subscription widget. Next set value as `Fixed`. -2. Go to the `Admin / Billings` and fill the inputs with your billing information. -3. Go to the `Admin / Payments` and turn on the switch `Allow Subscription Payments`. -4. Set up credentials for all payment gateway you want. If you set production mode, make sure you fill your credentials with production keys, and vice versa. If needed, don't forget to turn on `live mode` for PayPal. -5. Set up your webhooks, you can find your webhook url in payment gateway widget. -6. Go to the `Admin / Plans` and create your first plan. Make sure all payment gateways support the currency you want, especially for Paystack, it supports only `GHS, NGN, USD and ZAR`. - -## Upgrading From Testing Environment to the Production Mode -1. Go to the `Admin / Payments` and set up credentials for all payment gateway you want with production keys type. Don't forget to turn on `live mode` for PayPal. -2. Go to the `Admin / Plans` and delete all your previously created plans. They will be archived. -3. Create new production plans you want offer. - # Developers ## Running Environment On Your Localhost @@ -338,32 +207,6 @@ If you would like to generate demo content, run this command below. Admin accoun php artisan setup:dev ``` -### Generate Demo Data for Metered Subscription -If you would like to generate demo content for the subscription with the metered billing, run this command below. -``` -php artisan subscription:demo metered -``` - -### Generate Demo Data for Fixed Subscription -If you would like to generate demo content for the subscription with the fixed billing, please fill the credentials in your `.env` file for the payment systems you'd like to use: -``` -STRIPE_SECRET_KEY= -STRIPE_PUBLIC_KEY= -STRIPE_WEBHOOK_SECRET= - -PAYSTACK_SECRET= -PAYSTACK_PUBLIC_KEY= - -PAYPAL_CLIENT_ID= -PAYPAL_CLIENT_SECRET= -PAYPAL_WEBHOOK_ID= -PAYPAL_IS_LIVE=false -``` -and then run this command to generate demo content for fixed subscription: -``` -php artisan subscription:demo fixed -``` - ### Sanctum Stateful Domains After installation, please make sure your current host/domain where you are running app is included in your `.env` file in `SANCTUM_STATEFUL_DOMAINS` variable.