RSS Git Download  Clone
  bin simplified rwgps.pl (and /etc/init.d/rwgps), adapted for plenv Perl 5.40, using Plack::Runner direct to avoid having to hard-code path to plackup 6 months ago
  environments enabled query output to console by default in dev, can be overridden using SQL_TRACE env param 6 months ago
  lib enabled query output to console by default in dev, can be overridden using SQL_TRACE env param 6 months ago
  public * new form option to test progress function without modifying db * put version on style.css link rel to force read on each request * padded smart comment with white space for legibility 4 years, 8 months ago
  script * simplified process_src_files() logic regarding actions and selected form options * removed redundant \$t0 variable, using DSL 'var' instead * added check for existence of file_id before deletion (otherwise get silent failure to delete) * db-update-only no longer automatically dumps file to t/ directory (TODO: provide a form opt) * using uri_for() in route redirects * more tests for file upload, changed behaviour regarding test db checking 4 years, 8 months ago
  t moved get_fileId_id() function to an attribute (ride_id) in attempt to reduce confusion over what is being requested, and to reduce the number of calls to getting the fileId PK 4 years, 8 months ago
  views moved progress bar increment code to own function to simplify process of determining increment values for different config scenarios (separate or combined analysis & db update stages, and reset progress bar for db updates or not) 4 years, 7 months ago
  .gitignore 134B * simplified process_src_files() logic regarding actions and selected form options * removed redundant \$t0 variable, using DSL 'var' instead * added check for existence of file_id before deletion (otherwise get silent failure to delete) * db-update-only no longer automatically dumps file to t/ directory (TODO: provide a form opt) * using uri_for() in route redirects * more tests for file upload, changed behaviour regarding test db checking 4 years, 8 months ago
  MANIFEST 440B initial commit - accepts 2 tcx/gpx files, returns combined xml 9 years ago
  MANIFEST.SKIP 163B initial commit - accepts 2 tcx/gpx files, returns combined xml 9 years ago
  Makefile.PL 786B initial commit - accepts 2 tcx/gpx files, returns combined xml 9 years ago
  README.txt 3kB enabled query output to console by default in dev, can be overridden using SQL_TRACE env param 6 months ago
  config.json 97B new empty config.json to trigger D2::Core::Role::ConfigReader to include config_local.json; bootstrap upload & reset buttons 9 years ago
  config.yml 3kB * set default dbname (test) in config, overriden in production * displays dbname in pager summary test, including if overriden by upload form 4 years, 8 months ago
  cpanfile 1kB moved smtp debug setting into development.yml file; updated cpanfile; used bootstrap 'label for' in upload radio selection 9 years ago
  rwgps.sql 4kB * Changed xml_only flag to more obvious db_update_only * New form param skip_save for scripts to skip saving xml to disk - could extend for app * Add return value to archive_data() to signify db update success or skip 4 years, 9 months ago
  README.txt
* download files from RWGPS web-site as .tcx history, format WITHOUT "Use originally uploaded file if available" * needs a minimum of 3 workers for the upload progress bars to work * session handling using "plackup -E development -s Starman [..] bin/app.psgi" doesn't work, use Twiggy (or Starman using -E deployment): for dev (:3000): plackup -workers 3 -E development -s Twiggy -p 3000 -a bin/app.psgi for production (:5001): run service using daemontools or Daemon::Control * see bin/rwgps.pl for lighttpd config * for development, defaults to test db, can be overridden using DBNAME env param DBNAME=rwgps plackup bin/app.pl * query output enabled by default in dev, can be overriden using 'SQL_TRACE=0' env param ### daemontools ================================================================ apt-get install daemontools daemontools-run sudo mkdir -p /service/rwgps chmod 1755 /service/rwgps # new file /service/rwgps/run (chmod 755): ------------------------ #!/bin/sh export PERL5LIB='/home/raj/perl5/lib/perl5:/home/raj/apps/RWGPS/lib' exec 2>&1 setuidgid raj \ /home/raj/perl5/bin/plackup \ -E deployment -s Starman --workers=3 -p 5001 \ -a /home/raj/apps/RWGPS/bin/app.psgi #------------------------------------------------------------------- sudo update-service --add /service/rwgps to stop service: sudo svc -d /service/rwgps to start service: sudo svc -u /service/rwgps to restart (if running): sudo svc -t /service/rwgps to monitor: cd /service && sudo svstat rwgps to remove: sudo update-service --remove /service/rwgps ### for Daemon::Control ======================================================== bin/rwgps.pl & /etc/init.d/rwgps (see rwgps.pl for details) then: sudo update-rc.d rwgps defaults #----------------------------------------------------------------------------------- lighttpd web-server configuration: # /etc/lighttpd/lighttpd.conf: server.modules = ( [...] "mod_auth", "mod_alias", "mod_openssl", "mod_rewrite", ) $SERVER["socket"] == ":443" { ssl.engine = "enable" ssl.pemfile = "/home/raj/ssl/zbox.local/zbox.pem" <= combined cert.pem & key.pem server.name = "zbox.local" server.document-root = "/var/www/html/" } # /etc/lighttpd/conf-available/20-proxy.conf(new file + symlink in conf-enabled): $HTTP["host"] =~ "rwgps.zbox.lan$" { server.document-root = "/home/raj/apps/RWGPS/public/" proxy.server = ( "" => ( ( "host" => "127.0.0.1", "port" => 5001, #"host" => "/tmp/rwgps.sock", "check-local" => "disable", ) ) ) } ## check lighttpd config using: "sudo /usr/sbin/lighttpd -tt -f /etc/lighttpd/lighttpd.conf"