| Version | Date | Notes | By |
|---|---|---|---|
| 0.1 | 2019-01-18 | Initial release | JFM |
This document doesn't include the creation of the subdomain. You must create it and assure that it is propagated before proceeding
This was tested only on the Linode Test Server
This guide assumes you have access to the Linode Test Server
Read everything on this document before putting your hands on the terminal
Check the SGIV10 - Linode Test Server Instalations for the availability of the Redis Databases number and the ports for socket.io. currently the max number is 50
Be sure the subdomain is created and available - ping it
Be careful and check if the folders and database you are going to use on this installation doesn't already exist.
Be sure you know the MySQL Authentication of the server, you will need it
This scripts creates a HTTPS Let's Encrypt certificate using certbot. Usually the certificate goes to the folder /etc/letsencrypt/live/<subdomain> and this is assumed on this script automation. If you have any problems with the certificate, check if the configurations files are correct and pointing to the correct certificate
You must understand what you are doing :) close this if you don't :D
/root/scripts to see if the repo sgiv10-installations is already cloned. If not, clone it: git clone https://gitlab.wemake.pt/it/scripts/sgiv10-installations.git otherwise do a git pull to updateIf you update, always read the changes made on the commits before proceeding
Execute the script by running: ./sgi_project
You will be asked the following information regarding the installation:
| Information | Notes |
|---|---|
| Subdomain | The subdomain of the demo without the wemake.pt part |
| Branch | Always choose m for the Master branch unless there's the need have a demo to show the latest development. Beware it might be unstable |
| Client Name | Usually WeMake unless it's a demo for a particular client, then you can use the client name. |
| Licenses number | Usually 999 |
| Redis database number | Check the SGIV10 - Linode Test Server Installations document for available databases number |
| Redis cache number | Check the SGIV10 - Linode Test Server Installations document for available databases number. Usually its +1 the Redis database number |
| Laravel echo server | Check the SGIV10 - Linode Test Server Installations document for available ports. usually its somewhere on the 6 thousands ending with the Redis database number. Ex: 6021 |
| MySQL Database name | Choose an appropriate name that can be related with the subdomain. Usually something like demo## Ex: demo15 |
After this you will be asked for the modules you want to install, select them (usually all) and press OK.

Review you choices and choose y to start the installation or n to cancel
======================================================
Subdomain: demo16.wemake.pt
Client name: WeMake
Number of licences: 999
Redis database number: 30
Redis cache database number: 31
Laravel Echo Server Port: 6030
Modules to install: wemake/sgi-documents wemake/sgi-plans wemake/sgi-audits wemake/sgi-surveys wemake/sgi-equipments wemake/sgi-suppliers wemake/sgi-risk wemake/sgi-processes wemake/sgi-occurrences wemake/sgi-OHS wemake/sgi-ems wemake/sgi-meetings wemake/sgi-occupational-health wemake/sgi-training
======================================================
Is this information correct(y/n)?
After this, the script install and configures everything needed, including:
Database
Backend
/var/www/demo16-back.wemake.ptcomposer install, php artisan key:generate, composer require <modules>, php artisan migrate, php artisan reseed-translations and php artisan clear-all-cachesFrontend
This script uses an already cloned frontend repo that is located at /root/projects/sgiv10/
git checkout config.js package-lock.json, git pull, jspm install and executes the fix.sh scriptgulp export/var/www/demo16.wemake.ptConfig
Finally it reloads Apache and Supervisor and it should be ready to use. Test it on the browser and do some basic testing.
Happy installations! :)