There are two main options for installing Dropinbase.
Note, Dropinbase can also be installed on Shared Hosting Servers
Docker is similar to a virtual machine, but is more efficient regarding resource use. Windows, Linux and macOS are supported.
Using Docker has the advantage of a pre-configured Dropinbase setup that works "out of the box" and does not conflict with any existing applications.
Note for Windows users: Docker is supported for only specific versions of Windows.
npm install dropinbase -g [Enter]
- this installs the Dropinbase package globallycd c:/projects/www
- change to the directory of where the project must be installeddropinbase init myProject
- create a new Dropinbase Client project with a name of your choice
Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Scope Process
cd myProject
- change to the directory of the project you just creatednpm start
- connect to the Dropinbase Docker container and start the services.
https://localhost
.http://myapp.dib/nav/dibLoginForm?primary_id=1
The following steps should lead to a stable system. If any errors occur, see Troubleshooting Installation.
http://myapp.dib
)
composer install -vvv[Enter]
(the -vvv option prints detailed debugging information should you need it).require './installer.php'; die();
http://myapp.dib/
CREATE DATABASE IF NOT EXISTS `my_new_dib_database` DEFAULT CHARACTER SET = 'utf8mb4' DEFAULT COLLATE 'utf8mb4_unicode_520_ci';
CREATE USER 'my_dib_user'@'localhost' IDENTIFIED BY 'my_password';
GRANT SELECT, ALTER, CREATE, CREATE TEMPORARY TABLES, DELETE, INDEX, INSERT, UPDATE ON `my_new_dib_database`.* TO 'my_dib_user'@'localhost';
FLUSH PRIVILEGES;
use my_new_dib_database;
at the top: /vendor/dropinbase/dropinbase/installer/dropinbase.sql.http://myapp.dib
http://myapp.dib/nav/dibLoginForm?primary_id=1
A working Dropinbase installation requires the following to be in place:
NOTE: The Dropinbase Installer requires write permissions on the /projectFolder itself to overwrite the index.php file to comment out the line that runs the Installer.php file. If it fails it must be manually done.
On development machines, the webserver user (eg www-data) needs read/write permissions to files in the following folders, and all their subfolders:
On production servers all folders should be set to read-only, except the /runtime and user folders (eg DIB::$USERSPATH).
Use the chown and chmod commands to set ownership and file permissions, eg:
Folders: assign read and execute permissions on all folders to the owner (yourlinuxuser) and the group (webserver user). Execute permissions are needed to enter folders. Ensure these permissions are set on all folders, including the /vendor/dropinbase/dropinbase sub-folders:
Files: assign read and write to the owner (yourlinuxuser), and just read to the group (webserver user)
Assign read/write permissions to the following folders (-R sets it recursively for subfolders):
Assign read/write permissions to folders where Angular generates code (must be set to 750 on production server if all dibCode files exist)
Assign read/write permissions to folders where users upload files (if applicable):
node -v
in a terminal window.Note, this only affects the ability to create/change containers. Dropinbase should start up without Angular being installed.
This step is not necessary if you are installing the Dropinbase Docker container.
NPM (above) is required to install Angular.
Run the following commands in a terminal window (eg PowerShell on Windows):
cd /www/myProject/vendor/dropinbase/dropinbase/dropins/setNgxMaterial/angular
ls
(or dir
on Windows) on to list files and folders. If the node_modules folder or the package-lock.json file exists, delete them:
rm -rf ./node_modules
(or rmdir /s /q node_modules
on Windows)rm -rf ./package-lock.json
npm install
npm audit fix --force
This step is not necessary if you are installing the Dropinbase Docker container.
The Watcher is a Dropinbase script that runs in the background and watches for any Dropinbase containers to compile.
It speeds up the compilation process by avoiding the boostrapping process which runs otherwise each time.
The Watcher should start automatically, but if it doesn't, run the following commands in a terminal window:
cd /www/myProject/vendor/dropinbase/dropinbase/dropins/setNgxMaterial/angular
- replace /www/myProject with your own.npm run watch:modules
Note, remember to save files and restart Apache for changes to take effect!
The following Apache modules must be enabled:
If you are enabling the /vendor/dropinbase/dropinbase/installer/configs/.htaccess.for.production file, the following modules must be enabled which allows cache files to be zipped:
Adding entries to the virtual host file allows you to host multiple installations of Dropinbase applications on a machine, using a separate URL for each.
Example:
You have two Dropinbase projects, stored in the following two folders:
<VirtualHost *:80>
DocumentRoot "C:/wamp/www/project1"
ServerName dib.net
<directory "C:/wamp/www/project1">
Options -Indexes +FollowSymLinks
AllowOverride all
Require all granted
</directory>
</VirtualHost>
<VirtualHost *:80>
DocumentRoot "C:/wamp/www/project2"
ServerName project2.dib.net
<directory "C:/wamp/www/project2">
Options -Indexes +FollowSymLinks
AllowOverride all
Require all granted
</directory>
</VirtualHost>
To enable error logging for Apache, ensure the following line is uncommented/exists in httpd.conf (replace the path with your own):
ErrorLog "c:/wamp/logs/apache_error.log"
It may be useful to log errors in Apache's log file for debugging purposes, but this file can become very large depending on the LogLevel parameter (see comments in httpd.conf).
Note, after applying a fix below, delete the /www/projectFolder/runtime folder before testing further.
cd /www/myProject
composer show --platform
// phpinfo(); die();
include_once("./installer.php"); die();
- line must be commented out.include_once("./vendor/dropinbase/dropinbase/index.php"); die();
- line must be active.