Skip to content

Commit

Permalink
pm2,doc: prefer starting the app with pm2 yml config
Browse files Browse the repository at this point in the history
PR-URL: #29
  • Loading branch information
makemek committed Apr 26, 2017
1 parent cd39146 commit 34549ba
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 20 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ Please follows steps below to run Modcolle
3. Copy `/deployment/nginx/nginx.conf` to `\path\to\nginx\conf`. Make sure to backup nginx.conf first before overwrite.
4. Inside nginx.conf replace `app1` and `DOMAIN_NAME` with `localhost`
5. Start nginx
6. Type `npm install pm2 -g` and run `pm2 start process.json`
6. Type `npm install pm2 -g` and run `pm2 start process.yml`
7. Open a browser and type `localhost` in the url

## Starting the Application
Expand All @@ -56,7 +56,7 @@ npm start

In cluster mode using [PM2](https://npmjs.org/packages/pm2)
```
pm2 start process.json
pm2 start process.yml
```

In development mode with [nodemon](https://npmjs.org/packages/nodemon) and [browser-sync](https://npmjs.org/packages/browser-sync)
Expand All @@ -66,7 +66,7 @@ npm run dev

## Configuration
`.env.json` is the common configuration for Modcolle which will be created on first-time start or test by copying `.env.json.template` (no overwrite if file already exists).
At `env` section in `process.json` are environment variables that will override `.env.json` for running in production environment.
At `env` section in `process.yml` are environment variables that will override `.env.json` for running in production environment.

### Environment Variables
- LOGGER_SILENT: if `false` enables log, `true` disables log
Expand Down
17 changes: 0 additions & 17 deletions process.json

This file was deleted.

14 changes: 14 additions & 0 deletions process.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
apps:
- name: Modcolle
script: bin/www
watch: false
instances: 0
merge_logs: true
exec_mode: cluster_mode
error_file: ./log/error.log
out_file: ./log/out.log
pid_file: ./log/modcolle.pid

env:
NODE_ENV: production
PORT: 5000

0 comments on commit 34549ba

Please sign in to comment.