diff --git a/.gitignore b/.gitignore
index c07026c0b..9afa8b80d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -65,6 +65,7 @@ Machete\.Web/Content/Machete\.min\.css
Machete\.Web/Published
machete1env.list
+machete1env.json
node_modules/
diff --git a/README.md b/README.md
index 1a70d86ec..c306b3c00 100644
--- a/README.md
+++ b/README.md
@@ -5,8 +5,6 @@
[![Join the chat at https://gitter.im/machete-project/Lobby](https://badges.gitter.im/machete-project/Lobby.svg)](https://gitter.im/machete-project/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![GPLv3 license](https://img.shields.io/badge/License-GPLv3-blue.svg)](http://www.gnu.org/licenses/gpl-3.0.en.html)
-
-
Machete is a web application that manages a day labor referral service. Machete tracks work orders for employers looking
for short term, casual labor. It also provides a means for matching laborers with specific skills to requests made by
employers for skilled labor.
@@ -27,6 +25,7 @@ please contact chaim@ndlon.org.
`☮️ 💟 🍁`
+
## How to get started
@@ -53,6 +52,7 @@ Great, now you should be good to go!
`☕️ 💻 🐈`
+
## Setup scripts
@@ -63,8 +63,13 @@ inquiries should be directed to the [email](chaim@ndlon.org) above.
Aptly named, this file will dispose of whatever database container you have running (as long as you have the environment
variable for it set, which the script does), and create an entirely new database container.
-`./make_env_file.sh`
-This file will create an environment file that you can source to set certain variables. Only needed for OAuth development.
+`./make_env_secrets_file.sh`
+This file will create an environment file that you can source to set certain variables. Needed for OAuth development. If Machete is run in production
+mode, this file must be sourced (e.g., inside the container) so that `dotnet` can read the secrets from the environment.
+
+`./make_json_secrets_file.sh`
+This will take the file produced by the above script and turn it into a JSON file that can be piped to `dotnet user-secrets set --project=Machete.Web`.
+Eventually we should be doing this for production as well, but the pipeline depends on the `bash` variables.
`./completely-clean-build-and-run.sh`
This file will:
@@ -74,10 +79,14 @@ This file will:
4. Clean up any existing build(s).
5. Initialize the submodule, if it isn't initialized.
6. Start the Angular webpack server as a background process.
-7. Build and run Machete.
+7. Build and run Machete in production mode.
+
+Clearly, this is not a full development kit. We recommend using JetBrains Rider for debugging .NET applications on *nix. If you need user secrets in
+Rider, you can use the ones that are stored in the `dotnet user-secrets` store, as mentioned above.
`🎺 💃 🇲🇽`
+
## How to connect to the database
Download DataGrip. It has a 30 day evaluation period, but is not free software.
diff --git a/completely-clean-build-and-run.sh b/completely-clean-build-and-run.sh
index a508686f5..f7f27b4b6 100755
--- a/completely-clean-build-and-run.sh
+++ b/completely-clean-build-and-run.sh
@@ -1,7 +1,15 @@
+#!/bin/bash
+
# https://github.com/Microsoft/msbuild/issues/3362
+
+trap 'kill $(jobs -p)' EXIT
+
+echo "This script runs Machete in production mode, and should not be run simultaneously with a development build."
+sleep 2
+
export MSBUILDDISABLENODEREUSE=1
-if [ ! -f machete1env.list ]; then ./make_env_file.sh ; fi
+if [ ! -f machete1env.json ]; then ./make_env_file.sh ; fi
for var in $(cat machete1env.list); do
export $var
@@ -17,4 +25,4 @@ npm run start-local-dev &
cd ..
dotnet build
-dotnet run --project Machete.Web --configuration=Debug
+dotnet run --project Machete.Web --configuration=Release
diff --git a/make_env_file.sh b/make_env_secrets_file.sh
similarity index 100%
rename from make_env_file.sh
rename to make_env_secrets_file.sh
diff --git a/make_json_secrets_file.sh b/make_json_secrets_file.sh
new file mode 100755
index 000000000..43c83c95b
--- /dev/null
+++ b/make_json_secrets_file.sh
@@ -0,0 +1,16 @@
+#!/bin/bash
+
+echo '' > machete1env.json
+
+echo "{" >> machete1env.json
+#echo " \"Authentication\": {" >> machete1env.json
+for i in $(cat machete1env.list); do
+ fieldname=$(echo $i | awk -F= '{print $1}' | sed s/__/:/g | awk -F_ '{print $2}')
+ fieldvalue=$(echo $i | awk -F= '{print $2}')
+ echo " \"${fieldname}\": \"${fieldvalue}\"," >> machete1env.json
+done
+
+echo " \"stupidHack\": \"I don't have a comma\"" >> machete1env.json
+
+#echo " }" >> machete1env.json
+echo "}" >> machete1env.json