Compare commits
No commits in common. "6ffc4de42a235a9663f6c5632dc8e9572540b88a" and "553dc492a6b7ce4f9b1e88d635650b8e46dd22e1" have entirely different histories.
6ffc4de42a
...
553dc492a6
53
README.md
53
README.md
|
@ -1,16 +1,12 @@
|
||||||
|
|
||||||
# Operation Pandora Trigger Commandcenter
|
# Operation Pandora Trigger Commandcenter
|
||||||
|
|
||||||
A [MEAN Application](http://mean.io/) created for [operation-pandora.com](https://www.operation-pandora.com) Arma3 Community
|
[MEAN Application](http://mean.io/) created for [www.operation-pandora.com](https://www.operation-pandora.com) Arma3 Community
|
||||||
|
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
All steps described here are working with a Debian based Linux system
|
### Setup 3rd Party Software
|
||||||
|
|
||||||
### Setup required 3rd Party Software
|
|
||||||
|
|
||||||
#### Setup for development
|
|
||||||
|
|
||||||
Run the installation script located in the docs folder:
|
Run the installation script located in the docs folder:
|
||||||
|
|
||||||
|
@ -19,51 +15,28 @@ Run the installation script located in the docs folder:
|
||||||
It installs NPM, Node and MongoDB on latest versions.
|
It installs NPM, Node and MongoDB on latest versions.
|
||||||
In addition, it sets up the mongo deamon to start up automatically with the system.
|
In addition, it sets up the mongo deamon to start up automatically with the system.
|
||||||
|
|
||||||
#### Setup for production
|
## Development and Execution
|
||||||
|
|
||||||
**NOTE:** It his highly recommended not to run the following steps as _root_ user!
|
Before running any execution run
|
||||||
|
|
||||||
Before triggering the environment execution run
|
|
||||||
|
|
||||||
npm install
|
npm install
|
||||||
|
|
||||||
inside the main folder, to process all needed npm package installations for the program execution.
|
inside the main folder to trigger all needed npm package installations for the program execution.
|
||||||
|
|
||||||
For production setup run the script, described in _Setup for development_, adding the parameter `prod`
|
### Run in Dev Mode
|
||||||
|
*TODO*
|
||||||
|
|
||||||
./docs/opt-cc-environment/3rd-party-install prod
|
### Run in Production
|
||||||
|
*TODO*
|
||||||
This adds the [`pm2` process manager](http://pm2.keymetrics.io/) to be installed and start the _opt-cc_ server as `pm2` process.
|
|
||||||
Run the `sudo` command printed as last output to configure the `pm2` process for automatic start on the system, as the current user.
|
|
||||||
|
|
||||||
## Development
|
|
||||||
|
|
||||||
Before triggering the environment execution run
|
|
||||||
|
|
||||||
npm install
|
|
||||||
|
|
||||||
inside the main folder, to process all needed npm package installations for the program execution.
|
|
||||||
|
|
||||||
Do not use the execution described here in any production environment!
|
|
||||||
It will make the running application highly vulnerable. \
|
|
||||||
To compile the Angular code and afterwards start the Express server with `nodemon` for development purpose run
|
|
||||||
|
|
||||||
npm run dev
|
|
||||||
|
|
||||||
Any changes on `api` code will trigger an automatic restart of the Express server.
|
|
||||||
|
|
||||||
Changes on `static` code can be submitted with
|
|
||||||
|
|
||||||
npm run deploy-static
|
|
||||||
|
|
||||||
The page must be reloaded after this build step is finished, in order to make changes visible.
|
|
||||||
|
|
||||||
## License Information
|
## License Information
|
||||||
|
|
||||||
|
|
||||||
### Express API (`/api`)
|
### Express API (`/api`)
|
||||||
published under [CC BY-SA 4.0 License](https://creativecommons.org/licenses/by-sa/4.0/legalcode.txt) \
|
published under [CC BY-SA 4.0 License](https://creativecommons.org/licenses/by-sa/4.0/legalcode.txt)
|
||||||
Main concept for API Server, pagination and MongoDB usage by [Prof. Dr.-Ing. Johannes Konert](https://prof.beuth-hochschule.de/konert/) \
|
|
||||||
|
Main concept for API Server, pagination and MongoDB usage by [Prof. Dr.-Ing. Johannes Konert](https://prof.beuth-hochschule.de/konert/)
|
||||||
|
|
||||||
All endpoints, signature image builder and Arma3 RPT-Log parsing by [Florian Hartwich](https://de.linkedin.com/in/florian-hartwich-b67b02125)
|
All endpoints, signature image builder and Arma3 RPT-Log parsing by [Florian Hartwich](https://de.linkedin.com/in/florian-hartwich-b67b02125)
|
||||||
|
|
||||||
### Angular 5 Frontend (`/static`)
|
### Angular 5 Frontend (`/static`)
|
||||||
|
|
|
@ -5,10 +5,7 @@
|
||||||
"script": "./api/server.js",
|
"script": "./api/server.js",
|
||||||
"watch": false,
|
"watch": false,
|
||||||
"env": {
|
"env": {
|
||||||
"NODE_ENV": "production",
|
"TZ": "Europe/Berlin"
|
||||||
"DEBUG": "cc:*",
|
|
||||||
"TZ": "Europe/Berlin",
|
|
||||||
"JWS_SECRET": "secret"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
|
@ -1,7 +1,5 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
cd $(dirname $0)
|
|
||||||
|
|
||||||
#####################################################
|
#####################################################
|
||||||
###### INSTALL ALL REQUIRED 3RD-PARTY SOFTWARE ######
|
###### INSTALL ALL REQUIRED 3RD-PARTY SOFTWARE ######
|
||||||
#####################################################
|
#####################################################
|
||||||
|
@ -12,6 +10,7 @@ cd $(dirname $0)
|
||||||
|
|
||||||
# mongodb key & repo
|
# mongodb key & repo
|
||||||
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 2930ADAE8CAF5059EE73BB4B58712A2291FA4AD5
|
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 2930ADAE8CAF5059EE73BB4B58712A2291FA4AD5
|
||||||
|
|
||||||
echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.6 multiverse" | \
|
echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.6 multiverse" | \
|
||||||
sudo tee /etc/apt/sources.list.d/mongodb-org-3.6.list
|
sudo tee /etc/apt/sources.list.d/mongodb-org-3.6.list
|
||||||
|
|
||||||
|
@ -31,8 +30,5 @@ sudo ln -s ~/.nvm/versions/node/$(node -v)/bin/node /usr/bin/node
|
||||||
# upgrade to latest npm version
|
# upgrade to latest npm version
|
||||||
sudo npm install -g npm@latest
|
sudo npm install -g npm@latest
|
||||||
|
|
||||||
if [ "${1}" == "prod" ]; then
|
npm -v
|
||||||
sudo npm install -g pm2
|
node -v
|
||||||
pm2 start ./../../pm2-start.json
|
|
||||||
pm2 startup systemd
|
|
||||||
fi
|
|
Loading…
Reference in New Issue