api-client/.env.example
thibaud-leclere d56fb7d3d4 fix: decouple app URL from Coolify-managed SERVICE_FQDN_* variable
SERVICE_FQDN_* gets regenerated with a random hash on each Coolify save,
making custom domains impossible to persist. Introduce APP_URL as a single
user-controlled variable (never auto-generated) for all app URLs. Derive
VITE_BACKEND_WS_URL automatically from VITE_BASE_URL in aio_run.mjs so
only APP_URL needs to be set. SERVICE_FQDN_HOPPSCOTCH_80 is kept solely
for Coolify proxy routing.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-11 17:08:34 +02:00

56 lines
2.5 KiB
Text
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#-----------------------Backend Config------------------------------#
# Prisma Config
DATABASE_URL=postgresql://postgres:testpass@hoppscotch-db:5432/hoppscotch
# Sensitive Data Encryption Key while storing in Database (32 character)
DATA_ENCRYPTION_KEY=data encryption key with 32 char
# Whitelisted origins for the Hoppscotch App.
# This list controls which origins can interact with the app through cross-origin comms.
# - localhost ports (3170, 3000, 3100): app, backend, development servers and services
# - app://localhost_3200: Bundle server origin identifier
# NOTE: `3200` here refers to the bundle server (port 3200) that provides the bundles,
# NOT where the app runs. The app itself uses the `app://` protocol with dynamic
# bundle names like `app://{bundle-name}/`
WHITELISTED_ORIGINS=http://localhost:3170,http://localhost:3000,http://localhost:3100,app://localhost_3200,app://hoppscotch
# If true, the clients IP address is understood as the left-most entry in the X-Forwarded-For header
TRUST_PROXY=false
#-----------------------Frontend Config------------------------------#
# Base URLs
VITE_BASE_URL=http://localhost:3000
VITE_SHORTCODE_BASE_URL=http://localhost:3000
VITE_ADMIN_URL=http://localhost:3100
# Backend URLs
VITE_BACKEND_GQL_URL=http://localhost:3170/graphql
VITE_BACKEND_WS_URL=ws://localhost:3170/graphql
VITE_BACKEND_API_URL=http://localhost:3170/v1
# Terms Of Service And Privacy Policy Links (Optional)
VITE_APP_TOS_LINK=https://docs.hoppscotch.io/support/terms
VITE_APP_PRIVACY_POLICY_LINK=https://docs.hoppscotch.io/support/privacy
# Set default to null as https://proxy.hoppscotch.io/ doesn't require an access token
VITE_PROXYSCOTCH_ACCESS_TOKEN=
# Set to `true` for subpath based access
ENABLE_SUBPATH_BASED_ACCESS=false
#-----------------------Docker Image Config-------------------------#
# Used by docker-compose.prod.yml and Makefile image targets.
API_CLIENT_REGISTRY=forge.lclr.dev
API_CLIENT_NAMESPACE=thibaud-lclr
API_CLIENT_IMAGE_PREFIX=api-client
API_CLIENT_TAG=latest
#-----------------------Coolify Prod Local Defaults----------------#
# Used only when running docker-compose.prod.yml locally.
# In production, set APP_URL once in Coolify's env vars UI — it never gets overwritten.
# SERVICE_FQDN_HOPPSCOTCH_80 is only used by Coolify for proxy routing (value is managed by Coolify).
APP_URL=http://localhost:3000
SERVICE_FQDN_HOPPSCOTCH_80=http://localhost:3000
SERVICE_PASSWORD_POSTGRES=testpass
SERVICE_BASE64_HOPPSCOTCH=0123456789abcdef0123456789abcdef