OpenSupports is a simple and beautiful open source ticket system
Go to file
Maximiliano Redigonda 8c732f5dda
[DEV-190] Fix tests in Github Actions (#1217)
* Silly test

* Add better debugging, try starting service

* Try stopping and re-starting the mysql service, the old way

* Check status before running MySQL command

* Now that indeed mysql is not started, make it start

* [DEV-190] Try removing background-running of make run

* Ignore mysql service when not running at the beginning

* [DEV-190] Mount folder with instructions on how to initialize

* [DEV-190] Go back to using normal make run

* Adding -v command to mount volume with init scripts

* Remove SSH terminal to Github Actions instance

* Remove enabling of MySQL

* Remove unnecessary parts from Makefile
2022-06-01 07:00:00 -03:00
.circleci Use php7.0 for circleci 2021-11-25 11:29:06 +01:00
.github/workflows [DEV-190] Migrate tests from Travis CI to GitHub Actions (#1198) 2022-05-04 11:06:52 -03:00
client [DEV-268] Fix long loading time in homepage (#1206) 2022-05-30 16:04:32 -03:00
server [DEV-190] Fix tests in Github Actions (#1217) 2022-06-01 07:00:00 -03:00
tests [DEV-190] Fix tests in Github Actions (#1217) 2022-06-01 07:00:00 -03:00
version_upgrades Change 4.10.0 to 4.11.0 (#1126) 2022-01-04 13:24:06 -03:00
.gitignore Add automated release 2020-11-24 00:49:17 -03:00
.travis.yml Fix mocha version 2019-08-05 22:14:13 +02:00
LICENSE Update LICENSE 2018-07-05 07:24:20 -03:00
Makefile Add dev4 (#1142) 2022-02-03 03:18:43 -03:00
README.md Change 4.10.0 to 4.11.0 (#1126) 2022-01-04 13:24:06 -03:00
SECURITY.md Create SECURITY.md 2021-10-14 02:52:38 -03:00
build.sh Add circleci config 2020-10-29 18:30:32 -03:00
composer-setup.php Release 4.9.0 (#965) 2021-01-08 16:27:24 -03:00

README.md

OpenSupports

Build Status v4.11.0

OpenSupports is an open source ticket system built primarily with PHP and ReactJS. Please, visit our website for more information: http://www.opensupports.com/

Requirements

  • PHP 5.6+
  • MySQL 4.1+

Development

Here is a guide of how to set up the development environment in OpenSupports.

Getting up and running FRONT-END (client folder)

  1. Update: sudo apt-get update
  2. Clone this repo: git clone https://github.com/opensupports/opensupports.git
  3. Install node 4.x version:
    • sudo apt-get install curl
    • curl -sL https://deb.nodesource.com/setup_4.x | sudo -E bash -
    • sudo apt-get install -y nodejs
  4. Install npm: sudo apt-get install npm
  5. Go to client: cd opensupports/client
  6. Install dependencies: npm install
  7. Rebuild node-sass: npm rebuild node-sass
  8. Run: npm start (PHP server api it must be running at :8080)
  9. Go to the main app: http://localhost:3000/app or to the component demo http://localhost:3000/demo
  10. Your browser will automatically be opened and directed to the browser-sync proxy address.
  11. Use npm start-fixtures to enable fixtures and not require php server to be running.

OpenSupport uses by default the port 3000, but this port could already be used. If this is the case, you can modify this in the file: client/webpack.config.js.

Production Task

Just as there is a task for development, there is also a npm build task for putting the project into a production-ready state. This will run each of the tasks, while also adding the image minification task discussed above and the result store in dist/ folder.

Reminder: Notice there is index.html and index.php. The first one searches the backend server where config.js says it, the second one uses /api to find the server. If you want to run OpenSupports in a single server, then use index.php.

Frontend Unit Testing

  1. Do the steps described before.
  2. Install mocha: npm install -g mocha@6.2.0
  3. Run npm test to run the tests.

Getting up and running BACK-END (server folder)

  1. Install Docker CE
  2. Go to the server folder: cd opensupports/server
  3. Run make build to build the images
  4. Run make install to install composer dependencies
  • make run runs the backend and database
  • make stop stop backend and database server
  • make log show live server logs
  • make db access to mysql database console
  • make sh access to backend docker container bash
  • make test run phpunit tests
  • make doc to build the documentation (requires apidoc)

Server api runs on http://localhost:8080/ Also, there's a phpmyadmin instance running on http://localhost:6060/, you can access with the username root and empty password

Building

Once you've installed dependencies for frontend and backend, you can run ./build.sh and it will generate a zip file inside dist/ ready for distribution. You can use this file to install OpenSupports on a serving following the installation instructions

BACKEND API RUBY TESTING
  1. Go to tests folder: cd opensupports/tests
  2. Run make build to install ruby container and its required dependencies
  • make run for running tests (database will be cleared)
  • make clear for clearing database
BACKEND FAKE SMTP SERVER

If you're doing development, you can use a FakeSMTP server to see the mails that are being sent.

  1. Install Java if you don't have it yet:

    sudo apt-get install default-jre sudo apt-get install default-jdk

  2. Download FakeSMTP

  3. Extract the file from the zip and run it:

    java -jar fakeSMTP-2.0.jar

  4. Set the port to 7070 and start the SMTP server.

  5. Every time the application sends an email, it will be reflected there.