Skip to content

Commit

Permalink
[Closes #107] Changes to support deployment in AWS (#108)
Browse files Browse the repository at this point in the history
* Set up fastify to serve static build files from client

* Change start commands for deployment

* Try limiting heap size during build

* Add prisma generate to postbuild

* Remove NODE_OPTIONS from client build

* Add support for AWS SES email sending

* Fix start command, mailer SES support

* Fix formatting

* Update example.env to include all env vars referenced by the code
  • Loading branch information
francisli authored Aug 27, 2024
1 parent f779da0 commit ad2b79f
Show file tree
Hide file tree
Showing 9 changed files with 187 additions and 39 deletions.
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ services:
- 1080:1080
server:
build: .
command: bash -l -c "npm install && npm start"
command: bash -l -c "npm install && npm run start:dev"
environment:
- DATABASE_URL=postgresql://postgres@db/app
- SMTP_HOST=mail
Expand Down
142 changes: 108 additions & 34 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
"server"
],
"scripts": {
"start": "nf start -j Procfile.dev",
"heroku-postbuild": "npm run -w client build; cd server; npx prisma generate",
"start": "npm run -w server start",
"start:dev": "nf start -j Procfile.dev",
"test": "npm run test --workspaces",
"format": "npm run format --workspaces",
"format:check": "npm run format:check --workspaces",
Expand Down
10 changes: 9 additions & 1 deletion server/example.env
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
AWS_SES_ACCESS_KEY_ID=
AWS_SES_REGION=
AWS_SES_SECRET_ACCESS_KEY=
BASE_URL=http://localhost:5000
MAILER_FROM=no-reply@app.com
DATABASE_URL=
MAILER_FROM=no-reply@sflifeline.app
SESSION_SECRET_KEY=7f22fd4d63dc5f6fe4c27147ed4cdd6937803936ff5c9bf6119ee7a3bf5e8ac3
SMTP_HOST=
SMTP_PORT=
SMTP_USER=
SMTP_PASS=
Loading

0 comments on commit ad2b79f

Please sign in to comment.