-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Populates language selections from shops.languages rather than the translation files. Remove “entryText” from translation files. No need to provide core.languages in translation, selections are in native format for all languages by default (you can still override in translations though) Publication no longer returns all translations, just EN + chosen language Adds some checks for publications for Issue #14 Documentation updates for Issue #245 Resolves #251
- Loading branch information
Showing
27 changed files
with
361 additions
and
508 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,23 @@ | ||
#Installation | ||
**Prerequisites: Install npm and [node.js](http://nodejs.org/)** | ||
|
||
Once node (with `npm`) is installed, install meteor, clone the repo, and then start the application from the Terminal commmand line: | ||
Ensure that node (with `npm`) is installed, and then install Meteor. | ||
*Optional, but suggested: install `graphicsmagick`*. | ||
|
||
Clone the `reactioncommerce/reaction` repo, and then start the application from the Terminal commmand line: | ||
|
||
```bash | ||
curl https://install.meteor.com | /bin/sh | ||
git clone https://github.com/reactioncommerce/reaction.git | ||
cd reaction | ||
cd reaction && git checkout master | ||
meteor | ||
``` | ||
|
||
*Optional, but suggested: install `graphicsmagick`* | ||
This is the `master` branch. This will ensure your initial installation is a stable release. | ||
|
||
`git checkout development` to use the development branch. See [the package development documentation](https://github.com/reactioncommerce/reaction-core/blob/master/docs/packages.md) for details on working from the `development` branch. | ||
|
||
##Startup | ||
**Start** | ||
To start Reaction, run the `meteor` command: | ||
|
||
Browse to [http://localhost:3000](http://localhost:3000) and you should see Reaction running (sample data same as on demo site) | ||
|
@@ -21,7 +26,7 @@ The initial admin user for the site is auto generated, and displayed in your con | |
|
||
*Note: If you are running Reaction remotely (not localhost, ie: vm, aws, docker, etc) and don't want https forwarding, you may remove the [Meteor force-ssl](https://atmospherejs.com/meteor/force-ssl) package using `meteor remove force-ssl`. See [section in docs regarding https](https://github.com/reactioncommerce/reaction-core/blob/master/docs/installation.md#https).* | ||
|
||
## Reset | ||
**Reset** | ||
To reset project data and give you a fresh test dataset from `packages/reaction-core/private/data/*.json`: | ||
|
||
meteor reset | ||
|
@@ -40,101 +45,102 @@ meteor | |
|
||
*Note: currently we're not testing data schema compatibility between versions, which is why we use `meteor reset` in this example. It's not necessary if you want to preserve your data, but there may be compatibility issues.* | ||
|
||
#Deploying | ||
An example of a deployment with password to a [meteor.com hosted site](http://docs.meteor.com/#deploying) using config from settings/prod.json | ||
##Meteor settings | ||
A Meteor settings file can be used with the `meteor --settings` option. | ||
|
||
meteor deploy --settings settings/prod.json yourdemosite.meteor.com | ||
Copy [settings/dev.sample.json](https://github.com/reactioncommerce/reaction/blob/master/settings/dev.sample.json) and create a new `settings.json` file, for example: | ||
|
||
*Note: If you are running Reaction remotely (not localhost, ie: vm, aws, docker, etc) and don't want https forwarding, you may remove the [Meteor force-ssl](https://atmospherejs.com/meteor/force-ssl) package using `meteor remove force-ssl`. See [section in docs regarding https](https://github.com/reactioncommerce/reaction-core/blob/master/docs/installation.md#https).* | ||
|
||
```json | ||
{ | ||
"ROOT_URL": "", | ||
"MONGO_URL": "", | ||
"MAIL_URL": "", | ||
"reaction": { | ||
"METEOR_USER": "<username>", | ||
"METEOR_AUTH": "<password>", | ||
"METEOR_EMAIL": "<login email>" | ||
}, | ||
"isDebug": "info" | ||
} | ||
``` | ||
|
||
## settings.json configuration | ||
A configuration file can be loaded using the `meteor --settings` option. | ||
After you've created the `settings` file, add `--settings settings/settings.json` to the `meteor` startup command. | ||
|
||
Copy [settings/dev.sample.json](https://github.com/reactioncommerce/reaction/blob/master/settings/dev.sample.json) and create a new configuration file, for example: | ||
meteor --settings settings/settings.json --raw-logs | ||
|
||
cd reaction | ||
cp settings/dev.sample.json settings/settings.json | ||
### Environment variables | ||
|
||
After you've created and edited a configuration file, add `--settings settings/settings.json` to the `meteor` startup command. | ||
You can also use environment variables for settings, useful for headless and automated vm configuration. | ||
|
||
meteor --settings settings/settings.json --port 3000 | ||
```bash | ||
export ROOT_URL="" | ||
export MONGO_URL="<your mongodb connect string>" | ||
export MAIL_URL="<smtp connection string>" | ||
|
||
export METEOR_USER="<username>" | ||
export METEOR_AUTH="<password>" | ||
export METEOR_EMAIL="<login email>" | ||
``` | ||
|
||
Example configuration file | ||
The `METEOR_EMAIL`, `METEOR_USER`, `METEOR_AUTH` environment variables will configure the default administrator account. | ||
|
||
```json | ||
{ | ||
"baseUrl": "http://localhost:3000", | ||
"googleAnalyticsProperty": "__KEY__", | ||
"facebook": { | ||
"secret": "__SECRET__" | ||
}, | ||
"reaction": { | ||
"METEOR_USER": "Administrator", | ||
"METEOR_AUTH": "password", | ||
"METEOR_EMAIL": "root@localhost" | ||
}, | ||
"public": { | ||
"isDebug": true, | ||
"facebook": { | ||
"appId": "__APP_ID__" | ||
} | ||
} | ||
} | ||
``` | ||
*Note: Environment variables will override variables set in settings.json* | ||
|
||
### Environment variables | ||
**ROOT_URL** | ||
|
||
You can also use many of the settings as environment variables, useful for headless and automated vm configuration. | ||
*Export `ROOT_URL` and `packages/reaction-core/fixtures.coffee` will update the domain in the `shops` collection to match the domain from `ROOT_URL`.* This lets you use alternate domains, or enforce SSL on a fresh installation. An empty ROOT_URL will just default to *localhost*. | ||
|
||
```bash | ||
export MAIL_URL="<smtp connection string>" | ||
export METEOR_EMAIL="[email protected]" | ||
export METEOR_USER="admin" | ||
export METEOR_AUTH="password" | ||
export MONGO_URL="<your mongodb connect string>" | ||
export ROOT_URL="" | ||
``` | ||
**MAIL_URL** | ||
To send email you should configure the administrative SMTP email server. [env MAIL_URL variable](http://docs.meteor.com/#email_send) | ||
|
||
Alternatively can also set environment variables by adding them to a settings.json file, like so: | ||
*Note: This is not required, but password reset, and a few other items that use email templates won't work unless you configure this.* | ||
|
||
``` | ||
"reaction": { | ||
"METEOR_USER": "Administrator", | ||
"METEOR_AUTH": "password", | ||
"METEOR_EMAIL": "root@localhost" | ||
} | ||
``` | ||
**isDebug** | ||
Sets debugging levels. Accepts `true`,`false` or logging level. | ||
|
||
This can be useful (or even necessary) when deploying to a remote server that doesn't offer SSH access. *Note: Global environment variables will take precendence over variables set via settings.json* | ||
See: [conventions#logging](https://github.com/reactioncommerce/reaction-core/blob/development/docs/conventions.md#logging). | ||
|
||
The `METEOR_EMAIL`, `METEOR_USER`, `METEOR_AUTH` environment variables will create this email/user/password as the default first site admin user. | ||
**These are the only `reaction specific` variables used from settings.json.** | ||
|
||
To use another Mongodb, rather than the automatically instantiated development one: | ||
##Fixture Data | ||
|
||
```bash | ||
export MONGO_URL=mongodb://localhost:27017/dbname | ||
``` | ||
The `reaction-core` package installs sample data, translations, and other fixture defaults from `packages/reaction-core/private/data/`. | ||
|
||
If you set ```ROOT_URL``` we'll automatically update the domain in the *shops* collection to match the domain from ROOT_URL. This lets you use alternate domains, or enforce SSL on your installation. An empty ROOT_URL will just default to *localhost*. | ||
Each installed package ('Reaction App') can also provide fixture data. | ||
|
||
See [the packages development documentation](https://github.com/reactioncommerce/reaction-core/blob/master/docs/packages.md) to modify this and other core packages locally. | ||
|
||
### System Email | ||
To send email you should configure the administrative SMTP email server. [env MAIL_URL variable](http://docs.meteor.com/#email_send) | ||
A `server` method is available for loading collection fixture data: | ||
|
||
*Note: This is not required, but password reset, and a few other items that use email templates won't work unless you configure this.* | ||
*server/fixtures.coffee* | ||
``` | ||
Meteor.startup -> | ||
jsonFile = Assets.getText("private/data/Shipping.json") | ||
Fixtures.loadData ReactionCore.Collections.Shipping, jsonFile | ||
``` | ||
|
||
### HTTPS Redirect | ||
You can use `meteor remove force-ssl` to remove redirection to the `https` protocol. To add back, `meteor add force-ssl`. When developing locally, you should not have to remove https as Meteor internally redirects all `localhost` requests to the `http` protocol. However, if you are running on a VM, or using Vagrant, you should run `meteor remove force-ssl` and remove this package locally. | ||
##Troubleshooting | ||
|
||
### Fixture data | ||
The initial shop data is loaded from the reactioncommerce:reaction-core package /private/data directory. See [the packages development documentation](https://github.com/reactioncommerce/reaction-core/blob/master/docs/packages.md) to modify this and other core packages locally. | ||
**HTTPS Redirect** | ||
You can use `meteor remove force-ssl` to remove redirection to the `https` protocol. To add back, `meteor add force-ssl`. When developing locally, you should not have to remove https as Meteor internally redirects all `localhost` requests to the `http` protocol. However, if you are running on a VM, or using Vagrant, you should run `meteor remove force-ssl` and remove this package locally. | ||
|
||
### Failed to load c++ Json message | ||
**Failed to load c++ Json message** | ||
|
||
You can ignore this error, but if it annoys you can run | ||
```xcode-select --install``` (on a mac) or ```sudo apt-get install gcc make build-essential``` (on ubuntu) | ||
`xcode-select --install` (on a mac) or | ||
`sudo apt-get install gcc make build-essential` (on ubuntu) | ||
|
||
**env: node: No such file or directory** | ||
Caused by a broken node, npm installation. | ||
Reinstall Node.js with NPM (or when packaged seperately, reinstall them both). | ||
|
||
#Deploying | ||
An example of a deployment with password to a [meteor.com hosted site](http://docs.meteor.com/#deploying) | ||
|
||
meteor deploy --settings settings/<prod-settings>.json <yoursite>.meteor.com | ||
|
||
*Note: If you are running Reaction remotely (not localhost, ie: vm, aws, docker, etc) and don't want https forwarding, you may remove the [Meteor force-ssl](https://atmospherejs.com/meteor/force-ssl) package using `meteor remove force-ssl`. See [section in docs regarding https](https://github.com/reactioncommerce/reaction-core/blob/master/docs/installation.md#https).* | ||
|
||
##Docker | ||
Requires installation of Docker. On OS X or Windows install [boot2docker](http://boot2docker.io/). | ||
|
@@ -144,15 +150,17 @@ There is a Dockerfile in the project root that creates a Docker image of Reactio | |
We provide up to date images built from the master branch. These are the same images running on reactioncommerce.com. You can pull our latest build from the [Docker Hub](https://registry.hub.docker.com/u/ongoworks/reaction/), or from the Reaction directory you can build your own image: | ||
|
||
```bash | ||
docker build -t ongoworks/reaction . | ||
docker build -t reactioncommerce/reaction-test. | ||
``` | ||
|
||
Typically you would start a Docker/Reaction app container by starting the Docker image with the [docker command line `run`](https://docs.docker.com/reference/commandline/cli/#run): | ||
|
||
```bash | ||
docker run -i -t -e MONGO_URL="<your mongodb url>" -e ROOT_URL="http://localhost" -e PORT="8080" -p ::8080 -d ongoworks/reaction | ||
docker run -p :8080 -it reactioncommerce/reaction-test | ||
``` | ||
|
||
You can pass environment variables to Docker using `-e`, so to pass `ROOT_URL` you would do add `-e ROOT_URL="<myhost>"` to `docker run`. | ||
|
||
*Note: you cannot yet deploy your local docker build to reactioncommerce.com, but this functionality is being developed in the Launchdock project at [launchdock.io](http://launchdock.io/)* | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.