From 6a2d452f82edd2bed3311f0ea13b8d4612f72e7b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20B=C3=B6sch-Plepelits?= Date: Tue, 14 Nov 2017 20:22:25 +0100 Subject: [PATCH] More detailed installation instructions --- README.md | 2 ++ doc/INSTALL.md | 43 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+) create mode 100644 doc/INSTALL.md diff --git a/README.md b/README.md index e63392b8..4455a892 100644 --- a/README.md +++ b/README.md @@ -13,6 +13,8 @@ modulekit/build_cache bin/download_dependencies ``` +=> [more detailed Installation instructions](doc/INSTALL.md) + ### Upgrade ```sh cd openstreetbrowser diff --git a/doc/INSTALL.md b/doc/INSTALL.md new file mode 100644 index 00000000..6fae3b48 --- /dev/null +++ b/doc/INSTALL.md @@ -0,0 +1,43 @@ +These install instructions assume a plain Ubuntu 16.04 server installation. + +```sh +sudo apt install apache2 libapache2-mod-php git php-cli composer nodejs-legacy npm php-curl +sudo chmod 777 /var/www/html +cd /var/www/html +git clone https://github.com/plepe/openstreetbrowser.git +cd openstreetbrowser +npm install +# At 'npm install' ignore the error "Failed at the openstreetbrowser lint +# script 'standard src/*.js'. This just means that there are some errors with +# the coding style, but this is not fatal. +composer install +git submodule init +git submodule update +cp conf.php-dist conf.php +nano conf.php +npm run build +bin/download_dependencies +``` + +For improved performance you should also run: +```sh +modulekit/build_cache +``` + +Browse to http://localhost/openstreetbrowser + +Have fun! + +# Debugging +For debugging you should add the following line to conf.php: +```php +$modulekit_nocache = true; +``` + +Also you should run: +```sh +npm run watch +``` +This is very similar to `npm run build`, but watches JavaScript files for +changes and will update the dist/openstreetbrowser.js file. Also it will add +debugging information to the final JavaScript file.