opensupports/README.md

49 lines
2.0 KiB
Markdown
Raw Normal View History

2015-10-19 00:22:07 +02:00
OpenSupports v4.0
2015-08-16 01:47:51 +02:00
============
### Getting up and running
2015-10-19 00:26:42 +02:00
1. [Create MySQL Database](#markdown-header-create-mysql-database)
2015-10-19 00:22:07 +02:00
2. Clone this repo
3. Run `npm install` from the root directory
4. Create a mysql database
5. Run `gulp dev` (may require installing Gulp globally `npm install gulp -g`)
6. Your browser will automatically be opened and directed to the browser-sync proxy address
7. To prepare assets for production, run the `gulp prod` task (Note: the production task does not fire up the express server, and won't provide you with browser-sync's live reloading. Simply use `gulp dev` during development. More information below)
2015-08-16 01:47:51 +02:00
2015-10-19 00:22:07 +02:00
Now that `gulp dev` is running, the server is up as well and serving files from the `/build` directory. Any changes in the `/src` directory will be automatically processed by Gulp and the changes will be injected to any open browsers pointed at the proxy address.
2015-08-16 01:47:51 +02:00
2015-10-19 00:22:07 +02:00
### Create MySQL Database
2015-10-19 00:25:54 +02:00
2015-10-19 00:22:07 +02:00
1. Install mysql-server
2015-08-16 01:47:51 +02:00
2015-10-19 00:22:07 +02:00
Ubuntu
2015-08-16 01:47:51 +02:00
2015-10-19 00:22:07 +02:00
`sudo apt-get install mysql-server`
Cent OS
2015-08-16 01:47:51 +02:00
2015-10-19 00:22:07 +02:00
`sudo yum install mysql-server`
`/etc/init.d/mysqld start`
2015-08-16 01:47:51 +02:00
2015-10-19 00:22:07 +02:00
2. Access the mysql shell
2015-08-16 01:47:51 +02:00
2015-10-19 00:22:07 +02:00
`mysql -u root -p`
2015-08-16 01:47:51 +02:00
2015-10-19 00:22:07 +02:00
3. Create a new user
2015-08-16 01:47:51 +02:00
2015-10-19 00:22:07 +02:00
`CREATE USER 'os_dev'@'localhost' IDENTIFIED BY 'os_dev';`
2015-08-16 01:47:51 +02:00
2015-10-19 00:22:07 +02:00
4. Create a new database
2015-08-16 01:47:51 +02:00
2015-10-19 00:22:07 +02:00
`CREATE DATABASE os_dev;`
2015-08-16 01:47:51 +02:00
2015-10-19 00:22:07 +02:00
5. Assign privileges to user
2015-08-16 01:47:51 +02:00
2015-10-19 00:22:07 +02:00
`GRANT ALL ON os_dev.* TO 'os_dev'@'os_dev';`
2015-08-16 01:47:51 +02:00
##### Production Task
Just as there is the `gulp dev` task for development, there is also a `gulp prod` task for putting your project into a production-ready state. This will run each of the tasks, while also adding the image minification task discussed above. There is also an empty `gulp deploy` task that is included when running the production task. This deploy task can be fleshed out to automatically push your production-ready site to your hosting setup.
2015-10-19 00:22:07 +02:00
**Reminder:** When running the production task, gulp will not fire up the express server and serve your index.html. This task is designed to be run before the `deploy` step that may copy the files from `/build` to a production web server.