From 1fcb0e3fd5cec1e272b2b97f783e74de53b3264f Mon Sep 17 00:00:00 2001 From: Benjamin Morali Date: Fri, 28 Aug 2020 16:01:40 +0200 Subject: [PATCH] feat: update available environment variables (#51) --- .env | 3 +++ .env.development | 3 +++ .env.production | 3 +++ .gitignore | 3 --- gatsby-config.js | 5 +++-- 5 files changed, 12 insertions(+), 5 deletions(-) create mode 100644 .env create mode 100644 .env.development create mode 100644 .env.production diff --git a/.env b/.env new file mode 100644 index 00000000..3dd0b783 --- /dev/null +++ b/.env @@ -0,0 +1,3 @@ +MATOMO_APPLICATION_ID=20 +MATOMO_URL=https://matomo.fabrique.social.gouv.fr +SITE_URL=https://archifiltre.fabrique.social.gouv.fr diff --git a/.env.development b/.env.development new file mode 100644 index 00000000..3dd0b783 --- /dev/null +++ b/.env.development @@ -0,0 +1,3 @@ +MATOMO_APPLICATION_ID=20 +MATOMO_URL=https://matomo.fabrique.social.gouv.fr +SITE_URL=https://archifiltre.fabrique.social.gouv.fr diff --git a/.env.production b/.env.production new file mode 100644 index 00000000..3dd0b783 --- /dev/null +++ b/.env.production @@ -0,0 +1,3 @@ +MATOMO_APPLICATION_ID=20 +MATOMO_URL=https://matomo.fabrique.social.gouv.fr +SITE_URL=https://archifiltre.fabrique.social.gouv.fr diff --git a/.gitignore b/.gitignore index f8132751..30057d23 100644 --- a/.gitignore +++ b/.gitignore @@ -51,9 +51,6 @@ typings/ # Output of 'npm pack' *.tgz -# dotenv environment variable files -.env* - # gatsby files .cache/ public diff --git a/gatsby-config.js b/gatsby-config.js index 2d52547a..af4cf759 100644 --- a/gatsby-config.js +++ b/gatsby-config.js @@ -4,7 +4,9 @@ const path = require(`path`); require("dotenv").config({ path: `.env.${process.env.NODE_ENV || "dev"}`, }); - +console.log("==========================="); +console.log("process.env", process.env); +console.log("==========================="); module.exports = { plugins: [ `gatsby-plugin-typescript`, @@ -14,7 +16,6 @@ module.exports = { `gatsby-plugin-sharp`, { options: { - dev: true, matomoUrl: process.env.MATOMO_URL, siteId: process.env.MATOMO_APPLICATION_ID, siteUrl: process.env.SITE_URL,