-
Notifications
You must be signed in to change notification settings - Fork 10
Manual Installation
Marvin Menzerath edited this page Jul 11, 2018
·
2 revisions
- Installed packages:
git
,nodejs
,npm
,wget
- You should install a current Node.js version (e.g. v6 LTS) by following these instructions
- This process will also install the
npm
binary - Be advised that most linux distributions ship an older version of Node.js which will not work correctly
- A running webserver (e.g. apache2, nginx, lighttpd, etc.)
- A running DAPNET Core with a reachable REST-interface
- Download the repository:
git clone https://github.com/DecentralizedAmateurPagingNetwork/Web.git
- Checkout a specific tag:
git checkout tags/v2.0.0
- This is highly recommended for improved stability and a consistent user experience
- Also you should use the latest tag
- Copy
src/store/defaultUrls.json.example
tosrc/store/defaultUrls.json
and change the default url-settings - Copy
src/store/defaultText.json.example
tosrc/store/defaultText.json
and change the default custom text (displayed on the home page)- You may use HTML markup here
- Copy
src/store/defaultMap.json.example
tosrc/store/defaultMap.json
and change the default map-settings - (Optional) Edit
static/js/custom.js
and insert your custom javascript code (e.g. a Piwik tracking code)- You may use jQuery here
- Download the latest coverage-data from the central server and setup a cronjob to update these files regularly
- Create directory
static/coverage/
- Run initial download of coverage-files:
cd static/coverage && wget -m -nv -nH -nd -np -R "index.html*" -e robots=off http://web.db0sda.ampr.org/dapnet-coverage/
- Put the following line into a cronjob, adapt the
PATH_WEB
variable and make sure it runs regularly
MAILTO=root PATH_WEB=/opt/dapnet/Web */5 * * * * YOURUSERNAME if [ ! -d $PATH_WEB/dist/assets/coverage ]; then mkdir $PATH_WEB/dist/assets/coverage; fi && wget -m -nv -nH -nd -np -R "index.html*" -e robots=off -P $PATH_WEB/dist/assets/coverage http://web.db0sda.ampr.org/dapnet-coverage/
-
Be aware: this cronjob puts the latest coverage date directly into the
dist/assets/coverage/
-directory and thus overwrites the files generated by a previousnpm run build
command. It will not update the source-files in thestatic/coverage/
-directory
- Create directory
- Download all dependencies:
npm install
- Test your setup:
npm run dev
- Open your browser at
http://localhost:8081
and check that each of your customizations was successful
- Open your browser at
- Generate the production build:
npm run build
- Copy your freshly generated files from
dist/
into your webserver'shtdocs/
directory - Done!
Before updating make sure to read the changelog and to backup your customized files (see above)!
- Update your local repository:
git fetch
- Run through step 2 of the installation process
- Again you should use the latest tag
- Run through steps 8. to 11. of the installation process
- Done!
- Installation
- Development
-
Other
- Apache 2