diff --git a/.env.prod.default b/.env.prod.default new file mode 100644 index 00000000..0fed6943 --- /dev/null +++ b/.env.prod.default @@ -0,0 +1,43 @@ +# One Sky IT's Aether Framework and System +TESTING=This is a test env variable +PUBLIC_TESTING=This is a public test env variable + +CONTAINER_AE_APP_NODE=ae_app_node_prod +CONTAINER_AE_APP_NODE_RED=ae_app_node_prod_red +CONTAINER_AE_APP_NODE_GREEN=ae_app_node_prod_green +CONTAINER_AE_APP_NODE_BLUE=ae_app_node_prod_blue +OSIT_WEB_HTTP_PORT=8082 +OSIT_WEB_HTTPS_PORT=4435 + +# DOCKER_AE_SERVER_EXTRA_HOST=srv-nyx.oneskyit.com:104.237.143.4 +# DOCKER_AE_API_SERVER_EXTRA_HOST=api.oneskyit.com:104.237.143.4 +# DOCKER_AE_API_BAK_SERVER_EXTRA_HOST=bak-api.oneskyit.com:104.237.143.4 + +# Aether general shared config options +# For general shared config options like API access and use, database access and use, Redis, and SMTP +# home development, live testing, live production, onsite development, onsite testing, onsite production??? +AE_CFG_ID=7 + +## Aether API access and use +PUBLIC_AE_API_PROTOCOL=https +PUBLIC_AE_API_SERVER=api.oneskyit.com +PUBLIC_AE_API_BAK_SERVER=bak-api.oneskyit.com +PUBLIC_AE_API_SERVER_INTERNAL=aether_api_gunicorn +PUBLIC_AE_API_PORT=443 +PUBLIC_AE_API_PATH= +PUBLIC_AE_API_SECRET_KEY=XXXX +PUBLIC_AE_API_CRUD_SUPER_KEY=XXXX +PUBLIC_AE_NO_ACCOUNT_ID=No_Account_ID_Here +PUBLIC_AE_NO_ACCOUNT_ID_TOKEN=Nothing_to_see_here + +# Aether app specific config (SvelteKit) +AE_APP_CFG_ID=99 +AE_APP_ENV=development +AE_APP_NODE_PORT=3001 +AE_APP_NODE_PORT_RED=3002 +AE_APP_NODE_PORT_GREEN=3003 +AE_APP_NODE_PORT_BLUE=3004 + +PUBLIC_AE_ACCOUNT_ID=XXXX # OSIT = _XY7DXtc9MY; CHOW = 3Iid1aIRY5j +PUBLIC_AE_EVENT_ID=XXXX # OSIT = pjrcghqwert; CHOW = Mw6-Nv-Zf-5A +PUBLIC_AE_SPONSORSHIP_CFG_ID=XXXX # OSIT = t8jdjONCs0k; CHOW = ygjEuQQCzvk diff --git a/.env.staging.default b/.env.staging.default new file mode 100644 index 00000000..357aa99d --- /dev/null +++ b/.env.staging.default @@ -0,0 +1,45 @@ +# One Sky IT's Aether Framework and System +TESTING=This is a test env variable +PUBLIC_TESTING=This is a public test env variable + +CONTAINER_AE_APP_NODE=ae_app_node_prod +CONTAINER_AE_APP_NODE_RED=ae_app_node_prod_red +CONTAINER_AE_APP_NODE_GREEN=ae_app_node_prod_green +CONTAINER_AE_APP_NODE_BLUE=ae_app_node_prod_blue +OSIT_WEB_HTTP_PORT=8082 +OSIT_WEB_HTTPS_PORT=4435 + +# DOCKER_AE_SERVER_EXTRA_HOST=srv-nyx.oneskyit.com:104.237.143.4 +# DOCKER_AE_API_SERVER_EXTRA_HOST=dev-api.oneskyit.com:192.168.32.20 # Odd because this env is the development server +# DOCKER_AE_API_SERVER_EXTRA_HOST=dev-api.oneskyit.com:192.168.32.99 # Odd because this env is the development server +# DOCKER_AE_API_BAK_SERVER_EXTRA_HOST=test-api.oneskyit.com:104.237.143.4 # Odd because this env is the development server +# DOCKER_AE_API_TEST_SERVER_EXTRA_HOST=test-api.oneskyit.com:104.237.143.4 + +# Aether general shared config options +# For general shared config options like API access and use, database access and use, Redis, and SMTP +# home development, live testing, live production, onsite development, onsite testing, onsite production??? +AE_CFG_ID=5 + +## Aether API access and use +PUBLIC_AE_API_PROTOCOL=https +PUBLIC_AE_API_SERVER=dev-api.oneskyit.com +PUBLIC_AE_API_BAK_SERVER=test-api.oneskyit.com +PUBLIC_AE_API_SERVER_INTERNAL=aether_api_gunicorn +PUBLIC_AE_API_PORT=443 +PUBLIC_AE_API_PATH= +PUBLIC_AE_API_SECRET_KEY=dFP6J9DVj9hUgIMn-fNIqg +PUBLIC_AE_API_CRUD_SUPER_KEY=zp5PtX4zUsI +PUBLIC_AE_NO_ACCOUNT_ID=No_Account_ID_Here +PUBLIC_AE_NO_ACCOUNT_ID_TOKEN=Nothing_to_see_here + +# Aether app specific config (SvelteKit) +AE_APP_CFG_ID=99 +AE_APP_ENV=development +AE_APP_NODE_PORT=3001 +AE_APP_NODE_PORT_RED=3002 +AE_APP_NODE_PORT_GREEN=3003 +AE_APP_NODE_PORT_BLUE=3004 + +PUBLIC_AE_ACCOUNT_ID=XXXX # OSIT = _XY7DXtc9MY; CHOW = 3Iid1aIRY5j +PUBLIC_AE_EVENT_ID=XXXX # OSIT = pjrcghqwert; CHOW = Mw6-Nv-Zf-5A +PUBLIC_AE_SPONSORSHIP_CFG_ID=XXXX # OSIT = t8jdjONCs0k; CHOW = ygjEuQQCzvk diff --git a/.gitignore b/.gitignore index 014c5a28..46be007c 100644 --- a/.gitignore +++ b/.gitignore @@ -6,6 +6,8 @@ node_modules .env .env.* !.env.example +!.env.prod.default +!.env.staging.default vite.config.js.timestamp-* vite.config.ts.timestamp-* diff --git a/README.md b/README.md index 63525158..e65b3e75 100644 --- a/README.md +++ b/README.md @@ -81,7 +81,29 @@ npm install flowbite flowbite-svelte tailwind-merge @popperjs/core ## Build ## Environment file +### ".env" +This is the default used if others are not found when when "npm run dev" or "npm run build" is run. +### ".env.local" +This is used when "npm run dev" is run. This is not used in the production build. + +### ".env.production" +This is used when "npm run build" is run. This is not used in the development build. + +### ".env:prod" +This is modified to allow for a staging environment and production environment built. + +### ".env:staging" +This is modified to allow for a staging environment and production environment built. + +### Example Important Values when running in dev: +Note our home IP address that changes. +```bash +DOCKER_AE_API_SERVER_EXTRA_HOST=dev-api.oneskyit.com:108.28.68.107 + +PUBLIC_AE_API_SERVER=api.oneskyit.com +PUBLIC_AE_API_BAK_SERVER=bak-api.oneskyit.com +``` # create-svelte diff --git a/package.json b/package.json index dc832f30..8ae2863d 100644 --- a/package.json +++ b/package.json @@ -5,6 +5,8 @@ "scripts": { "dev": "vite dev", "build": "vite build", + "build:prod": "cp .env.prod .env.production && vite build", + "build:staging": "cp .env.staging .env.production && vite build", "preview": "vite preview", "test": "npm run test:integration && npm run test:unit", "check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json", diff --git a/src/routes/+layout.ts b/src/routes/+layout.ts index bcb8e534..383d024b 100644 --- a/src/routes/+layout.ts +++ b/src/routes/+layout.ts @@ -56,7 +56,7 @@ let ae_loc_init: key_val = { // properties: params, route, url // functions: fetch, setHeaders, parent, depends, untrack export async function load({ fetch, params, parent, route, url }) { // params, route, url - let log_lvl = 0; + let log_lvl = 2; // console.log(`Svelte root +layout.ts params:`, params); // console.log(`Svelte root +layout.ts route:`, route); // console.log(`Svelte root +layout.ts url:`, url); diff --git a/src/routes/sponsorships/10_edit_modal__sponsorship_obj.svelte b/src/routes/sponsorships/10_edit_modal__sponsorship_obj.svelte index 1ff9a82b..94705411 100644 --- a/src/routes/sponsorships/10_edit_modal__sponsorship_obj.svelte +++ b/src/routes/sponsorships/10_edit_modal__sponsorship_obj.svelte @@ -598,7 +598,7 @@ async function handle_submit_form_files(event) { inc_link: true, }) - // `${sponsorship_do.logo_li_json.primary.filename}`; + // `${sponsorship_do.logo_li_json.primary.filename}`; } }