diff --git a/examples/hackathon-submissions/.gitignore b/examples/hackathon-submissions/.gitignore index 5877b74bb3..eeb382ff5e 100644 --- a/examples/hackathon-submissions/.gitignore +++ b/examples/hackathon-submissions/.gitignore @@ -1,14 +1,12 @@ .wasp/ node_modules/ -# We by default ignore any dotenv files to avoid committing any secrets by accident. -# If this is too agressive for you, consider allowing specific files with `!` operator, -# or modify/delete these two lines. +# Ignore all dotenv files by default to prevent accidentally committing any secrets. +# To include specific dotenv files, use the `!` operator or adjust these rules. .env .env.* -# Don't ignore .env.client as it can't contain any secrets. -!.env.client -# Don't ignore example env files. + +# Don't ignore example dotenv files. !.env.example !.env.*.example diff --git a/examples/streaming/.gitignore b/examples/streaming/.gitignore index 78bf3c81d8..fd453426d8 100644 --- a/examples/streaming/.gitignore +++ b/examples/streaming/.gitignore @@ -1,13 +1,11 @@ .wasp/ node_modules/ -# We by default ignore any dotenv files to avoid committing any secrets by accident. -# If this is too agressive for you, consider allowing specific files with `!` operator, -# or modify/delete these two lines. +# Ignore all dotenv files by default to prevent accidentally committing any secrets. +# To include specific dotenv files, use the `!` operator or adjust these rules. .env .env.* -# Don't ignore .env.client as it can't contain any secrets. -!.env.client -# Don't ignore example env files. + +# Don't ignore example dotenv files. !.env.example !.env.*.example diff --git a/examples/thoughts/.gitignore b/examples/thoughts/.gitignore index 78bf3c81d8..fd453426d8 100644 --- a/examples/thoughts/.gitignore +++ b/examples/thoughts/.gitignore @@ -1,13 +1,11 @@ .wasp/ node_modules/ -# We by default ignore any dotenv files to avoid committing any secrets by accident. -# If this is too agressive for you, consider allowing specific files with `!` operator, -# or modify/delete these two lines. +# Ignore all dotenv files by default to prevent accidentally committing any secrets. +# To include specific dotenv files, use the `!` operator or adjust these rules. .env .env.* -# Don't ignore .env.client as it can't contain any secrets. -!.env.client -# Don't ignore example env files. + +# Don't ignore example dotenv files. !.env.example !.env.*.example diff --git a/examples/todo-typescript/.gitignore b/examples/todo-typescript/.gitignore index 13c2f4b290..fd453426d8 100644 --- a/examples/todo-typescript/.gitignore +++ b/examples/todo-typescript/.gitignore @@ -1,14 +1,11 @@ .wasp/ node_modules/ -# We by default ignore any dotenv files to avoid committing any secrets by accident. -# If this is too agressive for you, consider allowing specific files with `!` operator, -# or modify/delete these two lines. +# Ignore all dotenv files by default to prevent accidentally committing any secrets. +# To include specific dotenv files, use the `!` operator or adjust these rules. .env .env.* -# Don't ignore .env.client as it can't contain any secrets. -!.env.client -# Don't ignore example env files. + +# Don't ignore example dotenv files. !.env.example !.env.*.example - diff --git a/examples/tutorials/TodoApp/.gitignore b/examples/tutorials/TodoApp/.gitignore index 13c2f4b290..fd453426d8 100644 --- a/examples/tutorials/TodoApp/.gitignore +++ b/examples/tutorials/TodoApp/.gitignore @@ -1,14 +1,11 @@ .wasp/ node_modules/ -# We by default ignore any dotenv files to avoid committing any secrets by accident. -# If this is too agressive for you, consider allowing specific files with `!` operator, -# or modify/delete these two lines. +# Ignore all dotenv files by default to prevent accidentally committing any secrets. +# To include specific dotenv files, use the `!` operator or adjust these rules. .env .env.* -# Don't ignore .env.client as it can't contain any secrets. -!.env.client -# Don't ignore example env files. + +# Don't ignore example dotenv files. !.env.example !.env.*.example - diff --git a/examples/tutorials/TodoAppTs/.gitignore b/examples/tutorials/TodoAppTs/.gitignore index 78bf3c81d8..fd453426d8 100644 --- a/examples/tutorials/TodoAppTs/.gitignore +++ b/examples/tutorials/TodoAppTs/.gitignore @@ -1,13 +1,11 @@ .wasp/ node_modules/ -# We by default ignore any dotenv files to avoid committing any secrets by accident. -# If this is too agressive for you, consider allowing specific files with `!` operator, -# or modify/delete these two lines. +# Ignore all dotenv files by default to prevent accidentally committing any secrets. +# To include specific dotenv files, use the `!` operator or adjust these rules. .env .env.* -# Don't ignore .env.client as it can't contain any secrets. -!.env.client -# Don't ignore example env files. + +# Don't ignore example dotenv files. !.env.example !.env.*.example diff --git a/examples/waspello/.gitignore b/examples/waspello/.gitignore index 78bf3c81d8..fd453426d8 100644 --- a/examples/waspello/.gitignore +++ b/examples/waspello/.gitignore @@ -1,13 +1,11 @@ .wasp/ node_modules/ -# We by default ignore any dotenv files to avoid committing any secrets by accident. -# If this is too agressive for you, consider allowing specific files with `!` operator, -# or modify/delete these two lines. +# Ignore all dotenv files by default to prevent accidentally committing any secrets. +# To include specific dotenv files, use the `!` operator or adjust these rules. .env .env.* -# Don't ignore .env.client as it can't contain any secrets. -!.env.client -# Don't ignore example env files. + +# Don't ignore example dotenv files. !.env.example !.env.*.example diff --git a/examples/waspleau/.gitignore b/examples/waspleau/.gitignore index 78bf3c81d8..fd453426d8 100644 --- a/examples/waspleau/.gitignore +++ b/examples/waspleau/.gitignore @@ -1,13 +1,11 @@ .wasp/ node_modules/ -# We by default ignore any dotenv files to avoid committing any secrets by accident. -# If this is too agressive for you, consider allowing specific files with `!` operator, -# or modify/delete these two lines. +# Ignore all dotenv files by default to prevent accidentally committing any secrets. +# To include specific dotenv files, use the `!` operator or adjust these rules. .env .env.* -# Don't ignore .env.client as it can't contain any secrets. -!.env.client -# Don't ignore example env files. + +# Don't ignore example dotenv files. !.env.example !.env.*.example diff --git a/examples/websockets-realtime-voting/.gitignore b/examples/websockets-realtime-voting/.gitignore index 78bf3c81d8..fd453426d8 100644 --- a/examples/websockets-realtime-voting/.gitignore +++ b/examples/websockets-realtime-voting/.gitignore @@ -1,13 +1,11 @@ .wasp/ node_modules/ -# We by default ignore any dotenv files to avoid committing any secrets by accident. -# If this is too agressive for you, consider allowing specific files with `!` operator, -# or modify/delete these two lines. +# Ignore all dotenv files by default to prevent accidentally committing any secrets. +# To include specific dotenv files, use the `!` operator or adjust these rules. .env .env.* -# Don't ignore .env.client as it can't contain any secrets. -!.env.client -# Don't ignore example env files. + +# Don't ignore example dotenv files. !.env.example !.env.*.example diff --git a/waspc/data/Cli/templates/skeleton/.gitignore b/waspc/data/Cli/templates/skeleton/.gitignore index 40d0a7f0d5..fd453426d8 100644 --- a/waspc/data/Cli/templates/skeleton/.gitignore +++ b/waspc/data/Cli/templates/skeleton/.gitignore @@ -1,13 +1,11 @@ .wasp/ node_modules/ -# We by default ignore any dotenv files to avoid committing any secrets by accident. -# If this is too agressive for you, consider allowing specific files with `!` operator, -# or modify/delete these two lines. +# Ignore all dotenv files by default to prevent accidentally committing any secrets. +# To include specific dotenv files, use the `!` operator or adjust these rules. .env .env.* -# Don't ignore .env.client as it can't contain any secrets. -!.env.client -# Don't ignore example env files. + +# Don't ignore example dotenv files. !.env.example -!.env.*.example \ No newline at end of file +!.env.*.example diff --git a/waspc/examples/crud-testing/.gitignore b/waspc/examples/crud-testing/.gitignore index 40d0a7f0d5..fd453426d8 100644 --- a/waspc/examples/crud-testing/.gitignore +++ b/waspc/examples/crud-testing/.gitignore @@ -1,13 +1,11 @@ .wasp/ node_modules/ -# We by default ignore any dotenv files to avoid committing any secrets by accident. -# If this is too agressive for you, consider allowing specific files with `!` operator, -# or modify/delete these two lines. +# Ignore all dotenv files by default to prevent accidentally committing any secrets. +# To include specific dotenv files, use the `!` operator or adjust these rules. .env .env.* -# Don't ignore .env.client as it can't contain any secrets. -!.env.client -# Don't ignore example env files. + +# Don't ignore example dotenv files. !.env.example -!.env.*.example \ No newline at end of file +!.env.*.example diff --git a/waspc/examples/pg-vector-example/.gitignore b/waspc/examples/pg-vector-example/.gitignore index 40d0a7f0d5..fd453426d8 100644 --- a/waspc/examples/pg-vector-example/.gitignore +++ b/waspc/examples/pg-vector-example/.gitignore @@ -1,13 +1,11 @@ .wasp/ node_modules/ -# We by default ignore any dotenv files to avoid committing any secrets by accident. -# If this is too agressive for you, consider allowing specific files with `!` operator, -# or modify/delete these two lines. +# Ignore all dotenv files by default to prevent accidentally committing any secrets. +# To include specific dotenv files, use the `!` operator or adjust these rules. .env .env.* -# Don't ignore .env.client as it can't contain any secrets. -!.env.client -# Don't ignore example env files. + +# Don't ignore example dotenv files. !.env.example -!.env.*.example \ No newline at end of file +!.env.*.example diff --git a/waspc/examples/todo-typescript/.gitignore b/waspc/examples/todo-typescript/.gitignore index 40d0a7f0d5..fd453426d8 100644 --- a/waspc/examples/todo-typescript/.gitignore +++ b/waspc/examples/todo-typescript/.gitignore @@ -1,13 +1,11 @@ .wasp/ node_modules/ -# We by default ignore any dotenv files to avoid committing any secrets by accident. -# If this is too agressive for you, consider allowing specific files with `!` operator, -# or modify/delete these two lines. +# Ignore all dotenv files by default to prevent accidentally committing any secrets. +# To include specific dotenv files, use the `!` operator or adjust these rules. .env .env.* -# Don't ignore .env.client as it can't contain any secrets. -!.env.client -# Don't ignore example env files. + +# Don't ignore example dotenv files. !.env.example -!.env.*.example \ No newline at end of file +!.env.*.example diff --git a/waspc/examples/todoApp/.gitignore b/waspc/examples/todoApp/.gitignore index 78bf3c81d8..fd453426d8 100644 --- a/waspc/examples/todoApp/.gitignore +++ b/waspc/examples/todoApp/.gitignore @@ -1,13 +1,11 @@ .wasp/ node_modules/ -# We by default ignore any dotenv files to avoid committing any secrets by accident. -# If this is too agressive for you, consider allowing specific files with `!` operator, -# or modify/delete these two lines. +# Ignore all dotenv files by default to prevent accidentally committing any secrets. +# To include specific dotenv files, use the `!` operator or adjust these rules. .env .env.* -# Don't ignore .env.client as it can't contain any secrets. -!.env.client -# Don't ignore example env files. + +# Don't ignore example dotenv files. !.env.example !.env.*.example diff --git a/web/docs/project/env-vars.md b/web/docs/project/env-vars.md index 794662528a..68ebd51804 100644 --- a/web/docs/project/env-vars.md +++ b/web/docs/project/env-vars.md @@ -85,8 +85,8 @@ In the root of your Wasp project you can create two distinct files: REACT_APP_SOME_VAR_NAME=somevalue ``` -`.env.server` should not be committed to version control as it can contain secrets and is therefore by default already ignored in the `.gitignore` file that comes with a new Wasp app. -On the other hand, `.env.client` can be committed as it must not contain any secrets. +`.env.server` should not be committed to version control as it can contain secrets, while `.env.client` can be versioned as it must not contain any secrets. +By default, in the `.gitignore` file that comes with a new Wasp app, we ignore all dotenv files. :::info Dotenv files `dotenv` files are a popular method for storing configuration: to learn more about them in general, check out the [dotenv npm package](https://www.npmjs.com/package/dotenv).