From 2e9900ac1704d5d748af44da36b07e44fb058c3c Mon Sep 17 00:00:00 2001 From: addshore Date: Thu, 25 Mar 2021 16:47:36 +0000 Subject: [PATCH] Further cleanup to .env files & fix netlify (#71) * Further cleanup to .env files & fix netlify netlify was still referring to old names now .gitignore the base .env file.. make the actual .production one have the right NODE_ENV make another one for a develop prod version * Update .env.production --- .env | 3 --- .env.development.prod | 4 ++++ .env.production | 3 ++- .github/workflows/netlify-preview.yml | 4 ++-- .gitignore | 2 +- 5 files changed, 9 insertions(+), 7 deletions(-) delete mode 100644 .env create mode 100644 .env.development.prod diff --git a/.env b/.env deleted file mode 100644 index 4a55b76c..00000000 --- a/.env +++ /dev/null @@ -1,3 +0,0 @@ -VUE_APP_API_URL= -VUE_APP_API_MOCK=1 -VUE_APP_RECAPTCHA_SITE_KEY="6LeHzbMUAAAAABjNp0vILaWr5ZeYHmteF7rGuZNV" # todo replace with test key diff --git a/.env.development.prod b/.env.development.prod new file mode 100644 index 00000000..ef23d16d --- /dev/null +++ b/.env.development.prod @@ -0,0 +1,4 @@ +NODE_ENV=development +VUE_APP_API_URL="https://www.wbstack.com/api" +VUE_APP_API_MOCK=0 +VUE_APP_RECAPTCHA_SITE_KEY="6LeHzbMUAAAAABjNp0vILaWr5ZeYHmteF7rGuZNV" diff --git a/.env.production b/.env.production index ef23d16d..ab807119 100644 --- a/.env.production +++ b/.env.production @@ -1,4 +1,5 @@ -NODE_ENV=development +# This file is used when building the docker image +NODE_ENV=production VUE_APP_API_URL="https://www.wbstack.com/api" VUE_APP_API_MOCK=0 VUE_APP_RECAPTCHA_SITE_KEY="6LeHzbMUAAAAABjNp0vILaWr5ZeYHmteF7rGuZNV" diff --git a/.github/workflows/netlify-preview.yml b/.github/workflows/netlify-preview.yml index 327c2471..71632910 100644 --- a/.github/workflows/netlify-preview.yml +++ b/.github/workflows/netlify-preview.yml @@ -12,7 +12,7 @@ jobs: - uses: c-py/action-dotenv-to-setenv@v3 with: - env-file: .env.dev.mock + env-file: .env.development.mock - name: Use Node.js 14.x uses: actions/setup-node@v1 @@ -42,7 +42,7 @@ jobs: - uses: c-py/action-dotenv-to-setenv@v3 with: - env-file: .env.dev.prod + env-file: .env.development.prod - name: Use Node.js 14.x uses: actions/setup-node@v1 diff --git a/.gitignore b/.gitignore index 06645604..e0ef4e5d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,7 @@ .DS_Store node_modules /dist - +.env /tests/e2e/logs/