Skip to content

Self-hosted personal gallery application with online photo management and albums, supporting Live/Motion Photos, EXIF parsing, geolocation recognition, and an explore map.

feat(config): move mapbox token to runtime config

Timothy Yin495453302ce2
diff --git a/.env.example b/.env.example
index ace839b7..336b5ff3 100644
--- a/.env.example
+++ b/.env.example
@@ -10,9 +10,11 @@ NUXT_PUBLIC_APP_TITLE=ChronoFrame
NUXT_PUBLIC_APP_SLOGAN=Mems rest within the lens.
NUXT_PUBLIC_APP_AVATAR_URL=/avatar.webp
+# Mapbox access token for map features
+NUXT_PUBLIC_MAPBOX_ACCESS_TOKEN=
+
# Photo files storage provider: s3
NUXT_STORAGE_PROVIDER=s3
-
# S3 storage provider configuration
NUXT_PROVIDER_S3_ENDPOINT=
NUXT_PROVIDER_S3_BUCKET=
@@ -28,6 +30,3 @@ NUXT_SESSION_PASSWORD=
# GitHub OAuth app credentials
NUXT_OAUTH_GITHUB_CLIENT_ID=
NUXT_OAUTH_GITHUB_CLIENT_SECRET=
-
-# Mapbox access token for map features
-MAPBOX_TOKEN=
diff --git a/nuxt.config.ts b/nuxt.config.ts
index baf9b73e..c51968cf 100644
--- a/nuxt.config.ts
+++ b/nuxt.config.ts
@@ -26,6 +26,9 @@ export default defineNuxtConfig({
runtimeConfig: {
public: {
+ mapbox: {
+ accessToken: '',
+ },
APP_TITLE: 'ChronoFrame',
APP_SLOGAN: '',
APP_AVATAR_URL: '/avatar.webp',
@@ -104,8 +107,4 @@ export default defineNuxtConfig({
{ code: 'ja', name: '日本語', file: 'ja.json', language: 'ja' },
],
},
-
- mapbox: {
- accessToken: process.env.MAPBOX_TOKEN || '',
- },
})