-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add deploy to heroku #609
base: develop
Are you sure you want to change the base?
Add deploy to heroku #609
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here's some explanation of the code.
@@ -4,6 +4,7 @@ import redis from "redis"; | |||
import env from "./env"; | |||
|
|||
const client = redis.createClient({ | |||
url: env.REDIS_URL, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The short-circuit syntax REDIS_URL || {}
is not allowed with the @types/redis
type definition.
server/redis.ts(6,35): error TS2769: No overload matches this call.
The last overload gave the following error.
Argument of type 'string | { password: string; host: string; port: number; }' is not assignable to parameter of type 'ClientOpts'.
Type 'string' has no properties in common with type 'ClientOpts'.
"MAIL_HOST": { | ||
"required": false, | ||
"value": "" | ||
}, | ||
"MAIL_PORT": { | ||
"required": false, | ||
"value": "" | ||
}, | ||
"MAIL_USER": { | ||
"required": false, | ||
"value": "" | ||
}, | ||
"MAIL_PASSWORD": { | ||
"required": false, | ||
"value": "" | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will allow users to manually verify the user using the method mentioned in #269 (comment)
"PGSSLMODE": { | ||
"value": "no-verify" | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is needed to connect to Heroku's Postgres without modifying the js code.
https://devcenter.heroku.com/articles/connecting-heroku-postgres#connecting-in-node-js
"NPM_CONFIG_PRODUCTION": { | ||
"value": "false" | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is needed for knex migrate to run properly.
This would allow users to easily deploy to Heroku.
Additionally, it also adds support for DB and Redis URL configuration, which is required for Heroku deployment