Skip to content

Commit 83f482c

Browse files
committed
update readme
1 parent 6ddc0b7 commit 83f482c

File tree

2 files changed

+34
-9
lines changed

2 files changed

+34
-9
lines changed

README.md

Lines changed: 33 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
# phpGPS
2+
23
A php based webservice for GPS tracking with Google Maps integration
4+
35
========
46

57
www.mikelduke.com
68

7-
89
*******************************************************************************
910
A php based webservice for GPS tracking with Google Maps integration
1011

@@ -17,8 +18,8 @@ https://developers.google.com/maps/documentation/embed/get-api-key
1718

1819
*******************************************************************************
1920

20-
2121
## Features
22+
2223
* Stores gps coordinates in a MySQL database, generates xml, and draws markers on to a Google Maps map.
2324
* Draw Paths on the map using the gps entries
2425
* Paths can be colored
@@ -32,34 +33,58 @@ https://developers.google.com/maps/documentation/embed/get-api-key
3233
* To embed on a webpage:
3334
```<iframe src="view.php" height="520" width="520" seamless></iframe>```
3435

35-
Example Update URL:
36-
http://yoursite.com/phpGPS/addGpsEntry.php?key=1234&newEntry=Y&gps_devicename=DeviceID&gps_type_id=1&gps_path_id=1&gps_date_dt=11-13-2014&gps_date_time=22.31&gps_status=&gps_latitude=32&gps_longitude=-96&gps_altitude=160.0&gps_accuracy=57&gps_name=test%20spot&gps_comment=test%20comment&gps_address1=address%201&gps_address2=address%202&gps_address3=address%203&gps_city=city&gps_zipcode=567567&gps_state=state&gps_country=country
36+
Example Update URL:
37+
`http://yoursite.com/phpGPS/addGpsEntry.php?key=1234&newEntry=Y&gps_devicename=DeviceID&gps_type_id=1&gps_path_id=1&gps_date_dt=11-13-2014&gps_date_time=22.31&gps_status=&gps_latitude=32&gps_longitude=-96&gps_altitude=160.0&gps_accuracy=57&gps_name=test%20spot&gps_comment=test%20comment&gps_address1=address%201&gps_address2=address%202&gps_address3=address%203&gps_city=city&gps_zipcode=567567&gps_state=state&gps_country=country`
38+
39+
*******************************************************************************
3740

3841
## Important Pages
42+
3943
* phpGPS_Settings.php - Settings File
4044
* generateXML.php - Generates xml for use by google maps
4145
* view.php - Displays the map with markers, embeddedable in an iframe
4246

43-
4447
## Requirements
48+
4549
* php 5+
4650
* MySQL
4751
* Webserver
4852

53+
*******************************************************************************
4954

5055
## Install Instructions
56+
5157
1. Extract php files to webhost
5258
1. Create Database for use by phpGPS
53-
1. Enter database settings and other config in phpGPS_Settings.php
59+
1. Enter database settings and other config in phpGPS_Settings.php or set using environment variables
5460
1. Open phpGPS/install/install.php in browser to create the necessary tables
5561
1. Delete the install folder on webhost
5662
1. Login as user admin/admin and change the default admin pass
5763
1. Set up owners, devices, paths, etc as desired and start creating markers
5864

59-
# Demo VM
65+
### Demo VM
66+
6067
Requires Vagrant + VM Provider like VirtualBox + Google Maps API Key
68+
6169
* Clone this repo and make sure .sh files use unix line endings LF
6270
* Set API Key in phpGPS_Settings.php
6371
* Run ```vagrant up```
64-
* Connect at http://localhost
72+
* Connect at `http://localhost`
73+
* Login with user/password: admin/admin
74+
75+
*******************************************************************************
76+
77+
## Development
78+
79+
Dockerfile and Docker-compose configs are included for easy setup on Linux/Mac. Windows + Docker is not as seamless.
80+
81+
Use `docker-compose up` to automatically load a basic mysql server and an apache+php server.
82+
The application is mounted as a volume to allow for modifying php scripts without restarts.
83+
84+
* Install docker and docker-compose if not already present `sudo apt install docker docker-compose`
85+
* Clone this repo, ensure Unix line endings are used
86+
* Set api key in shell `export DEV_KEY=1234567890`
87+
* Launch with `docker-compose up`
88+
* Connect at `http://localhost:8080`
6589
* Login with user/password: admin/admin
90+
* Control+C or `docker-compose down` to stop

docker-compose.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ services:
1111
- DB_NAME=phpgps
1212
- DB_USER=phpgps
1313
- DB_PASSWORD=password
14-
- DEV_KEY # set dev key here or set as envvar on local machine to passthrough
14+
- DEV_KEY # set dev key here or export as envvar on local machine to passthrough
1515
networks:
1616
- test
1717
mysql:

0 commit comments

Comments
 (0)