From b25bf4af27be04ab11bc677bf7b5a678352ea53c Mon Sep 17 00:00:00 2001 From: Sean Morley Date: Mon, 26 May 2025 13:59:18 -0400 Subject: [PATCH] Add Google Maps integration documentation and update docker-compose for API key --- docker-compose.yml | 1 + documentation/.vitepress/config.mts | 9 +++-- .../configuration/google_maps_integration.md | 36 +++++++++++++++++++ 3 files changed, 43 insertions(+), 3 deletions(-) create mode 100644 documentation/docs/configuration/google_maps_integration.md diff --git a/docker-compose.yml b/docker-compose.yml index eca6a8c..0127223 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -42,6 +42,7 @@ services: - CSRF_TRUSTED_ORIGINS=http://localhost:8016,http://localhost:8015 # Comma separated list of trusted origins for CSRF - DEBUG=False - FRONTEND_URL=http://localhost:8015 # Used for email generation. This should be the url of the frontend + # - GOOGLE_MAPS_API_KEY=your_google_maps_api_key # OPTIONAL, read more at https://adventurelog.app/docs/configuration/google_maps_integration.html ports: - "8016:80" depends_on: diff --git a/documentation/.vitepress/config.mts b/documentation/.vitepress/config.mts index 3d52727..e664d27 100644 --- a/documentation/.vitepress/config.mts +++ b/documentation/.vitepress/config.mts @@ -1,7 +1,5 @@ import { defineConfig } from "vitepress"; -const inProd = process.env.NODE_ENV === "production"; - // https://vitepress.dev/reference/site-config export default defineConfig({ head: [ @@ -58,7 +56,8 @@ export default defineConfig({ softwareVersion: "v0.9.0", license: "https://github.com/seanmorley15/adventurelog/blob/main/LICENSE", - screenshot: "https://raw.githubusercontent.com/seanmorley15/AdventureLog/refs/heads/main/brand/screenshots/adventures.png", + screenshot: + "https://raw.githubusercontent.com/seanmorley15/AdventureLog/refs/heads/main/brand/screenshots/adventures.png", downloadUrl: "https://github.com/seanmorley15/adventurelog", sameAs: ["https://github.com/seanmorley15/adventurelog"], keywords: [ @@ -171,6 +170,10 @@ export default defineConfig({ text: "Immich Integration", link: "/docs/configuration/immich_integration", }, + { + text: "Google Maps Integration", + link: "/docs/configuration/google_maps_integration", + }, { text: "Social Auth and OIDC", link: "/docs/configuration/social_auth", diff --git a/documentation/docs/configuration/google_maps_integration.md b/documentation/docs/configuration/google_maps_integration.md new file mode 100644 index 0000000..2618d12 --- /dev/null +++ b/documentation/docs/configuration/google_maps_integration.md @@ -0,0 +1,36 @@ +# Google Maps Integration + +To enable Google Maps integration in AdventureLog, you'll need to create a Google Maps API key. This key allows AdventureLog to use Google Maps services such as geocoding and location search throughout the application. + +Follow the steps below to generate your own API key: + +## Google Cloud Console Setup + +1. Go to the [Google Cloud Console](https://console.cloud.google.com/). +2. Create an account if you don't have one in order to access the console. +3. Click on the project dropdown in the top bar. +4. Click **New Project**. +5. Name your project (e.g., `AdventureLog Maps`) and click **Create**. +6. Once the project is created, ensure it is selected in the project dropdown. +7. Click on the **Navigation menu** (three horizontal lines in the top left corner). +8. Navigate to **Google Maps Platform**. +9. Once in the Maps Platform, click on **Keys & Credentials** in the left sidebar. +10. Click on **Create credentials** and select **API key**. +11. A dialog will appear with your new API key. Copy this key for later use. + + + +## Configuration in AdventureLog + +Set the API key in your environment file or configuration under the backend service of AdventureLog. This is typically done in the `docker-compose.yml` file or directly in your environment variables `.env` file. + +```env +GOOGLE_MAPS_API_KEY=your_api_key_here +``` + +Once this is set, AdventureLog will be able to utilize Google Maps services for geocoding and location searches instead of relying on the default OpenStreetMap services.