From 453f70ba9ee6a8a7054ed0c81ec48bded9d5ce4f Mon Sep 17 00:00:00 2001 From: Aaron Parecki Date: Wed, 8 Nov 2017 16:57:49 -0800 Subject: [PATCH] expand .env example and readme --- README.md | 24 +++++++++++++++++++++++- compass/.env.example | 16 ++++++++++++---- 2 files changed, 35 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 29f1c1a..df04914 100644 --- a/README.md +++ b/README.md @@ -4,8 +4,30 @@ Compass is a GPS tracking server that stores data in [flat files](https://github ![mapview](screenshot-mapview.jpg) +## Requirements + +* PHP 5.5 or above +* MySQL (for storing user accounts and lists of databases, not for storing the actual location data) + +### PHP extensions + +You'll need to make sure the following PHP extensions are installed. Typically these are installed using the package manager of your operating system. + +* curl +* mbstring +* phpunit +* zip +* unzip + +### Optional + +* Redis (for the job queue, can use MySQL instead) + + ## Setup +Compass is built using the [Lumen framework](https://lumen.laravel.com/). If you have any trouble getting started, you can refer to the [Lumen documentation](https://lumen.laravel.com/docs/5.1) for tips that may have been skipped or assumed in these instructions. + In the `compass` directory, copy `.env.example` to `.env` and fill in the details. Install the dependencies with composer. ``` @@ -27,7 +49,7 @@ try_files $uri /index.php?$args; ``` ### Job Queue -For the job queue you will either need to have one of the supported options by Luman. The two most likely options are an SQL database or Redis. +For the job queue you will either need to have one of the supported options by Lumen. The two most likely options are an SQL database or Redis. You can find other supported options [here](https://lumen.laravel.com/docs/5.1/queues#introduction) If you're using the database queue driver (`QUEUE_DRIVER=database` defined in `.env`), you'll need to create the migration for that table: diff --git a/compass/.env.example b/compass/.env.example index 299a792..ab2dec3 100644 --- a/compass/.env.example +++ b/compass/.env.example @@ -1,14 +1,18 @@ # Where you've installed Compass BASE_URL=https://compass.example.com/ -# Atlas is used for geocoding trips +# Atlas is used for geocoding trips. +# You can use mine or install your own. # Source code: https://github.com/aaronpk/Atlas ATLAS_BASE=https://atlas.p3k.io/ -# Make sure the web server or PHP process can write here +# This is where the location data will be saved. +# Compass will create a folder for each "database" you create after you log in. +# Make sure the web server or PHP process can write here. STORAGE_DIR=/var/compass/data -# Set APP_KEY to a 32 character string +# Set APP_KEY to a 32 character string. This is used to encrypt session data. +# You can generate a string using the command `php artisan key:generate` APP_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx # Define your database connection @@ -29,10 +33,14 @@ SESSION_LIFETIME=500000 QUEUE_DRIVER=database # QUEUE_DRIVER=redis +# This is how Compass signs users in. You can leave it set to the default, and +# you'll be redirected there to authenticate as your domain name. +# You can also run your own instance, or even point it to your own website +# if it supports the IndieAuth protocol https://indieweb.org/indieauth-for-login DEFAULT_AUTH_ENDPOINT=https://indieauth.com/auth APP_ENV=local -APP_DEBUG=true +APP_DEBUG=false APP_LOCALE=en APP_FALLBACK_LOCALE=en