summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoseph Ditton <jditton.atomic@gmail.com>2021-12-04 20:27:04 -0700
committerJoseph Ditton <jditton.atomic@gmail.com>2021-12-04 20:27:04 -0700
commitd844431745c547f3117036724067b1eb73e48309 (patch)
tree748a72d632b90490b6afdc3bc5c8bed3bb12b638
parent03108dffe046826f4c72f711cfd787714c4bd8fd (diff)
downloadlocchat-d844431745c547f3117036724067b1eb73e48309.tar.gz
locchat-d844431745c547f3117036724067b1eb73e48309.zip
update readme and add procfile
-rw-r--r--Procfile1
-rw-r--r--README.md48
-rw-r--r--package.json4
3 files changed, 53 insertions, 0 deletions
diff --git a/Procfile b/Procfile
new file mode 100644
index 0000000..723924b
--- /dev/null
+++ b/Procfile
@@ -0,0 +1 @@
+web: yarn start:prod \ No newline at end of file
diff --git a/README.md b/README.md
index 50e6abb..fd484a0 100644
--- a/README.md
+++ b/README.md
@@ -132,3 +132,51 @@ $ yarn test:e2e
# test coverage
$ yarn test:cov
```
+
+## Setup Heroku
+We will deploy all our projects to Heroku. Heroku is a cloud platform that is easy and free to use. Will only need to run these step once for each computer you are working on this semester.
+
+### Create an account
+On heroku.com create an account.
+
+### Install Heroku CLI
+If you don't have the heroku CLI installed you can install it by running. You should only need to do this once on each computer you are working on.
+
+```bash
+$ curl https://cli-assets.heroku.com/install.sh | sh
+```
+
+### Login to CLI
+To log into the CLI run
+```bash
+$ heroku login
+```
+and follow the prompts. After a while, you maybe be prompted to login again which is fine.
+
+
+
+## Deploy Setup
+Follow these steps to deploy and app, you should only have to do this once per application
+
+### Create app in heroku
+1. Go to your heroku dashboard and create a new application.
+
+2. Once your app has been created you will need to enable the Postgres addon. Select the `Resources` tab and search for `Heroku Postgres` addon.
+
+3. On the screen that pops up make sure `Hobby Dev` is selected (that is the free option) and click the submit order button.
+
+4. Click on the `Settings` tab, select the `Reveal Config Vars` button, and verify you have an entry for `DATABASE_URL`.
+
+### Setup config vars
+You will need to add entries in Heroku for each of the production config vars in the `.env` file.
+
+To do this go the `Settings` tab in your app on heroku and click `Reveal Config Vars`. Fill out the key and value for each entry.
+
+**DO NOT MANUALLY SET THE `PORT`, `USE_SSL`, `NODE_ENV`, OR `DATABASE_URL` VARS.** These will be managed for you by Heroku
+
+You should generate new values for the `ENCRYPTION_KEY`, `REFRESH_ENCRYPTION_KEY`, and `ADMIN_PASSWORD` vars. I recommend using a real email address for your `ADMIN_EMAIL`.
+
+All vars should be named the exact same as they are in the `.env` file.
+
+
+
diff --git a/package.json b/package.json
index 2e02cb9..c685997 100644
--- a/package.json
+++ b/package.json
@@ -17,6 +17,7 @@
"db:reset": "yarn db:start && yarn typeorm schema:drop && yarn db:migrate && yarn db:seed",
"db:setup": "bash bin/create_db.sh && yarn db:migrate && yarn db:seed",
"prebuild": "rimraf dist",
+ "postbuild": "yarn db:migrate && yarn db:seed",
"build": "nest build && yarn client:build",
"format": "prettier --write \"server/**/*.ts\" \"test/**/*.ts\"",
"console": "ts-node -r tsconfig-paths/register server/console.ts",
@@ -96,5 +97,8 @@
],
"coverageDirectory": "../coverage",
"testEnvironment": "node"
+ },
+ "engines": {
+ "node": "14.18"
}
}