Environment variables
Environment variable names used to build the storefront bundles and to run the related services and scripts. Values are not recorded here.
Values are held in local .env files, which git ignores, and in Cloud Run service configuration. Ask the project owner for them. Do not commit them or paste them into tickets.
Storefront build
Read by src/webpack.config.js from src/.env, and inlined into theme/assets/camp-booking.bundle.js. The build fails if either is missing.
| Variable | Used for | Format |
|---|---|---|
GOOGLE_PLACES_API_KEY | School search in the booking form | Google Maps browser key |
ZOHO_INTEGRATION_API_ENDPOINT | Club search in the booking form | Base URL of shopify-zoho-integration, with no trailing / |
Both values end up in public JavaScript. The Google key must be restricted by referrer in Google Cloud.
The same Maps key is also written as a literal in src/js/camp-booking.js.
The root .env.example lists the same two names. The root .env, where it exists, is used by scripts in misc/, not by the build.
asc-api-membership-pass
Set on the Cloud Run service. Names from that repository's configuration.
| Variable | Used for |
|---|---|
SHOPIFY_STORE_NAME | Store handle, australian-sports-camps |
SHOPIFY_ACCESS_TOKEN | Admin API token |
SHOPIFY_STOREFRONT_ACCESS_TOKEN | Storefront API token, for cart changes |
ONLINE_STORE_PUBLICATION, API_PUBLICATION | Publication ids the pass products are published to |
PORT | Listening port, default 3000 |
LOG_LEVEL, LOG_PRETTY, LOG_NAME | Logging |
NODE_ENV | gcloud writes JSON logs to a mounted Cloud Storage volume |
shopify-zoho-integration
Set on the Cloud Run service. Documented in that repository's README.md and docs/configuration.md.
| Group | Variables |
|---|---|
| Shopify | SHOPIFY_STORE_NAME, SHOPIFY_GRAPHQL_API_VERSION, SHOPIFY_ZOHO_BRIDGE_ADMIN_ACCESS_TOKEN, SHOPIFY_ZAPIER_AUTO_ARCHIVE_ADMIN_ACCESS_TOKEN, SHOPIFY_ZAPIER_AUTO_ARCHIVE_STOREFRONT_ACCESS_TOKEN, SHOPIFY_GCLOUD_API_ADMIN_ACCESS_TOKEN, SHOPIFY_GCLOUD_API_STOREFRONT_ACCESS_TOKEN |
| Zoho | ZOHO_NEW_BOOKING_CLIENT_ID, ZOHO_NEW_BOOKING_CLIENT_SECRET, ZOHO_NEW_BOOKING_REFRESH_TOKEN, ZOHO_RUN_FUNCTION_API_KEY |
MAILGUN_API_KEY, DEV_EMAIL, CLIENT_EMAIL, EMAIL_HANDLER_URL | |
| Forms | HULKFORMS_API_KEY |
| Environment | ORDER_HANDLE_ENVIRONMENTS, API_ENVIRONMENT |
| Admin app sign-in | JWT_SECRET, JWT_PUB, JWT_PRIVATE_KEY_PASSPHRASE, JWT_ALG |
| Firestore | GOOGLE_APPLICATION_CREDENTIALS, FIREBASE_PROJECT_ID, FIREBASE_DATABASE_ID |
| Server | PORT |
The Shopify tokens come from three custom apps in the store: "Zoho CRM Bridge", "Zapier - Auto-archive membership products" and "Google Cloud API".
Legacy google-cloud-api
| Variable | Used for |
|---|---|
SHOPIFY_STORE_NAME, SHOPIFY_ACCESS_TOKEN, SHOPIFY_STOREFRONT_ACCESS_TOKEN | Shopify clients |
ONLINE_STORE_PUBLICATION, API_PUBLICATION | Publishing pass products |
PORT | Listening port |
It reads google-cloud-api/.env. The names differ from those in the root .env, so it does not start with the root file.
misc scripts
| Script | Variables |
|---|---|
misc/seo-redirects/*.cjs | SHOPIFY_STORE_NAME, SHOPIFY_API_VERSION, SHOPIFY_GCLOUD_API_ADMIN_ACCESS_TOKEN, from the root .env |
misc/filter-metafield-sync/main.mjs | SHOPIFY_STORE_NAME, SHOPIFY_ADMIN_TOKEN |
misc/zoho-find-broken-participants.mjs, misc/zoho-get-booking-participants.mjs | ZOHO_API_TOKEN |
misc/zapier-scripts/* | SHOPIFY_ZOHO_BRIDGE_ADMIN_ACCESS_TOKEN, SHOPIFY_ZAPIER_AUTO_ARCHIVE_ADMIN_ACCESS_TOKEN, ZOHO_NEW_BOOKING_CLIENT_ID, ZOHO_NEW_BOOKING_CLIENT_SECRET, ZOHO_NEW_BOOKING_REFRESH_TOKEN, ZOHO_CAMP_UPDATE_BOOKING_DETAILS_API_KEY |
The Zapier script builds inline these values into their output files. Do not commit or share the dist/ output.
Values held in theme settings
These are not environment variables, but they change per environment in the same way.
| Setting | Holds |
|---|---|
gcloud_api_root | asc-api-membership-pass base URL |
download_brochure_webhook, download_brochure_landing_page_webhook, form_submission_webhook | Zapier catch hook URLs |
hotjar_id, gtm_id, adwords_id | Analytics ids |