Are0h 2021-04-27 14:42:51 -07:00
parent 44bb9d8c75
commit acca4ca49c

@ -1,58 +1,49 @@
# The Setup # The Setup
## For Blogging ## For Blogging
If you're using Fipamo on a server to host and serve, it doesn't care what kind of web server you have. Just set up a reverse proxy so it knows where to find your site and hook it up to our domain. There are a couple examples below to get you started If you're using Fipamo on a server to host and serve, it doesn't care what kind of web server you have. Just make sure the server points to `public/index.php` and it's all good.
Once that is done, grab a copy of the latest [release](https://code.playvicio.us/Are0h/Fipamo/releases) or clone `git clone https://code.playvicio.us/Are0h/Fipamo.git --branch beta-release your-folder` (replace 'your-folder' with whatever you want) it to make it easier to update. Once that is done, grab a copy of the latest [release](https://code.playvicio.us/Are0h/Fipamo/releases) or clone `git clone https://code.playvicio.us/Are0h/Fipamo.git --branch beta your-folder` (replace 'your-folder' with whatever you want) it to make it easier to update. Once you're in there run `php composer.phar install` (or just `composer install` if Composer is installed globally) to install Fipamo's dependencies.
Go into the directory you dumped in and run `npm install` so it grabs all the stuff it needs to run. Once that process completes, run `npm start` and that will get everything up and running. Head to `http://localhost:2314/@/dashboard` locally or `http://your-domain.whatever/@/dashboard` if you installed it on a server and enter some basic info for the set up and you're good go. From here, you have a couple of options depending on where Fipamo is installed. If you're using it on your desktop, go into `public/index` and start up PHP's built in web server with `php -S localhost:8000` and then browse to localhost:8000/dashboard to get started with the install. If you're serving it from a web host, just go to http://yourdomain/dashboard.
Up and running? [Learn how to use Fipamo.](https://code.playvicio.us/Are0h/Fipamo/wiki/02-Usage) Up and running? [Learn how to use Fipamo.](https://code.playvicio.us/Are0h/Fipamo/wiki/02-Usage)
## For Dev Collaboration ## For Dev Collaboration
To contribute to Fipamo, you're going to need to grab a copy of the `develop` branch. Do that with `git clone https://code.playvicio.us/Are0h/Fipamo.git`. Also make sure you have [nodemon](https://nodemon.io/) installed as that what the development branch useses to spark up the server and reset the server when changes are made. Run `npm install -g nodemon` and your all set. To contribute to Fipamo, you're going to need to grab a copy of the `develop` branch. Do that with `git clone https://code.playvicio.us/Are0h/Fipamo.git`.
Once you have a copy, jump into the directory and run `npm install` to grab everything the branch needs to run. Once you have a copy, follow the same instructions for the above 'For Blogging' section to get up and running. This branch contains the front end scripting and style pages for the Dashboard.
From here there are two commands that need to run to create the scripts and css assets that dashboard needs and monitor further changes to update to those assets when changes are made. The first is `npm run watch`. This will keep an eye on stylus and script edits and render those assets accordingly. The second is `npm run dev` and this will start up the server and monitor changes that are made to core functionality and restart the server when needed. Both of these scripts will run in the background while code edits are being made. To see those changes, go to `http://localhost:2314/@/dashboard`.
**NOTE** The default port for Fipamo is `2314` but it can be configured in `site/settings.json`. This requires an manual restart so run 'npm stop', change the port in the settings file and 'npm start' to start the site back up again and it will pick up on the new port settings. DO NOT FORGET TO MAKE THE CHANGE IN YOUR REVERSE PROXY CONFIG. IF YOU DON'T APACHE/NGINX WILL NOT KNOW WHERE THE SITE IS RUNNING AND WON'T BE SERVED. VERY IMPORTANT.
**Reverse Proxy for NGINX** **NGINX Config**
``` ```
server { server {
listen 80; listen 80;
server_name yourcoolassdomain.com; server_name yourcoolassdomain.com;
client_max_body_size 20M //Change to whatever to limit/increase file upload size client_max_body_size 20M //Change to whatever to limit/increase file upload size
location / { location / {
proxy_pass https://127.0.0.1:2314; try_files $uri /index.php$is_args$args;
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;
}
} }
``` ```
**Reverse Proxy for Apache** **Apache Config**
``` ```
<VirtualHost *:80> <VirtualHost *:80>
ServerName yourcoolassdomain.org ServerAdmin admin@yourcoolassdomain.com
ProxyPreserveHost On ServerName yourcoolassdomain.com
ProxyPass "/" "http://127.0.0.1:2314/" ServerAlias www.yourcoolassdomain.com
ProxyPassReverse "/" "http://127.0.0.1:2314" DocumentRoot /path-to-fipamo-folder/public
LimitRequestBody 16384 ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost> </VirtualHost>
``` ```
Also it is strongly recommened to set up a ssl certificate to protect yourself if your using Fipamo through a web server. [Certbot](https://certbot.eff.org/instructions) makes this proces dead simple. Also it is strongly recommened to set up a ssl certificate to protect yourself if your using Fipamo through a web server. [Certbot](https://certbot.eff.org/instructions) makes this proces dead simple.
### Updating Fipamo ### Updating Fipamo
When updating the first thing you need to do is to shut down the site. Fipamo comes with script to make this easy, so just to the directory where you installed Fipamo and type `npm stop` and the site will shut down.
There are two ways to update Fipamo. If you're using git, you can just go into the directory where you set up your site and do a `git pull` to get the latest. If you're not using git, just grab the latest [release](https://code.playvicio.us/Are0h/Fipamo/releases) and replace your files. There are two ways to update Fipamo. If you're using git, you can just go into the directory where you set up your site and do a `git pull` to get the latest. If you're not using git, just grab the latest [release](https://code.playvicio.us/Are0h/Fipamo/releases) and replace your files.
Use either method to get the new stuff and then start the site back up again using `npm start`. Easy peasy, lemon squeezy. Easy peasy.