An easy way to manage deployment into development, UAT or staging environments for Suite CRM projects.
Before installation, have Prerequisites fulfilled before selecting and running appropriate type of installation.
-
In order to run this repo you should use a pc with a GNU/Linux Operative System and you should ensure to have installed the following commands:
- curl
- unzip
- docker
- docker-compose
Note[1]: Since we're using docker-compose.yml version 3.7, it is important that your version of docker-compose is up to date.
Note[2]: If you're using a CentOS 7 or Fedora 30 O.S. you could use our init script placed into the bin/ folder to automatically install all the dependencies.
-
Clone this repo from github:
git clone https://github.com/unipart/suitecrm-dev-ops.git
-
Move into the project folder
- Copy the docker-compose.template.yml file and rename it docker-compose.yml with the following command:
cp docker-compose.template.yml docker-compose.yml
- Copy the etc/dev/.env.dev.example file to .env with the following command:
cp etc/dev/.env.dev.example .env
- Edit the .env file to your needs
- Edit the file: features/Suites/LocalInstall/local_install.feature to match the .env and to your needs
- Run the install script:
./bin/install.sh
- Copy the docker-compose.uat.template.yml file and rename docker-compose.uat.yml with the following command:
cp docker-compose.uat.template.yml docker-compose.uat.yml
- Copy the etc/uat/.env.uat.example file to .env with the following command:
cp etc/dev/.env.uat.example .env
- Edit the .env file to your needs
- Edit the file features/Suites/RemoteInstall/remote_install.feature to match the .env and to your needs
- Run the install script:
./bin/install.sh -e UAT
If you want to use this skeleton repo to load your SuiteCRM instance, please use the following step:
- Copy your file into app/ folder, ensure that within app/ are placed all SuiteCRM folders and files
- Copy into etc/dev/ folder the configuration files config.php and config_override.php
cp app/config.php etc/dev/config.php cp app/config_override.php etc/dev/config_override.php
- Edit etc/dev/config.php based on your .env file, if you're using the .env.dev.example file you should edit as follow:
- Configure the dbconfig section in order to match your .env file
'dbconfig' => array ( 'db_host_name' => 'mariadb', 'db_host_instance' => 'SQLEXPRESS', 'db_user_name' => 'suitecrm_user', 'db_password' => 'suitecrmdevpass', 'db_name' => 'suitecrm', 'db_type' => 'mysql', 'db_port' => '', 'db_manager' => 'MysqliManager', ),
- Edit the hostname to match your host
'host_name' => 'localhost',
- Set the log directory
'log_dir' => '/var/log/suitecrm/',
- Configure the session directory
'session_dir' => '/var/www/sessions/',
- Set the site url as follow
'site_url' => 'http://localhost:8080',
- Configure the dbconfig section in order to match your .env file
- Add to your docker-compose.yml file section services > app > volumes the following lines:
./etc/dev/config.php:/var/www/html/config.php ./etc/dev/config_override.php:/var/www/html/config_override.php
- Start the environment with:
docker-compose up -d
File or directory | Description |
---|---|
app/ | SuiteCRM main application directory, in this folder you can find the config.php file, however if you're going to use the suggested docker-compose orchestration it will be rewritten by |
bin/ | Executable scripts folder. |
bin/init_centos7_root.sh | Bash script to initialize a clean version of CentOS 7 from the root user. Note (1): Please remember to edit the script before use, you have to change < SPECIFY USER HERE > to the username that will run docker. Note (2): In order to ensure that all the environment variables are correctly set up, after executing the script you'll need to logout and log back in with the docker user. |
bin/init_centos7_user.sh | Bash script to initialize a clean version of CentOS 7 from a system user. Note (1): Please ensure that the user you're using has sudo rights. Note (2): In order to ensure that all the environment variables are correctly set up, after executing the script you'll need to logout and log back in with the docker user. |
bin/init_fedora30_user.sh | Bash script to initialize a clean version of Fedora 30 from a system user. Note (1): Please ensure that the user you're using has sudo rights. Note (2): In order to ensure that all the environment variables are correctly set up, after executing the script you'll need to logout and log back in with the docker user. |
bin/install.sh | Perform a fresh installation of SuiteCRM. |
containers/suitecrm/dev/Dockerfile | SuiteCRM Development container dockerfile. |
containers/suitecrm/uat/Dockerfile | SuiteCRM User Acceptance Testing container dockerfile. |
etc/ | SuiteCRM Configuration folder, used also to override configuration files within app/ like conf.php, conf_override.php, etc. |
etc/dev/.env.dev.example | Docker compose .env file for development environment. |
etc/dev/dev.php.ini | Php.ini file for development environment. |
etc/uat/.env.uat.example | Docker compose .env file for user acceptance testing environment. |
etc/uat/uat.php.ini | Php.ini file for uat or stage environment. |
features/ | Behat features folder. |
features/bootstrap/ | Behat Context folder. |
features/Suites/ | Behat Suites folder, it is used to collect features files ordered in different subdirectory per suite. |
storage/suitecrm/SuiteCRM-7.18.*.zip | Latest SuiteCRM LTS installation zip file. |
volumes/ | Volume folder for docker based projects. |
behat.yml | Behat configuration file. |
composer.json | Project description. |
composer.lock | Last stable run of composer install lock file. |
docker-compose.template.yml | Template for docker-compose.yml for development environment. |
docker-compose.uat.template.yml | Template for docker-compose.yml for user acceptance testing environment. |
LICENSE | GPL v3 License that applies to this code. |
README.md | This readme. |