Skip to content

Commit

Permalink
build: update deps
Browse files Browse the repository at this point in the history
  • Loading branch information
cerinoligutom committed Jul 20, 2023
1 parent 5677619 commit 5ad2a2d
Show file tree
Hide file tree
Showing 8 changed files with 649 additions and 650 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Declare a Docker build-time variable
ARG NODE_IMAGE_VERSION=18-alpine
ARG NODE_IMAGE_VERSION=20-alpine

### Builder Stage ###

Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.dev
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# https://github.com/nodejs/docker-node/blob/master/docs/BestPractices.md

FROM node:18-alpine
FROM node:20-alpine

EXPOSE 8080

Expand Down
18 changes: 16 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@ docker-compose up -d
docker-compose logs -f api
```

Then refer to [Database Migrations and Seeding](#database-migrations-and-seeding) to setup the database.

**Note:** You might be prompted to share your drive with Docker if you haven't done so previously. The drive letter you need to share in this case would be the drive letter of where this repository resides.

---
Expand Down Expand Up @@ -320,10 +322,22 @@ pnpm exec prisma migrate dev

This will run database migrations. If there are changes in the Prisma Schema before you run this command, it will create a migration file and you will be prompted for a name for the migration. Make sure to double check the output.

**Note:** This executes the seeding process every time you run this command. You can pass the `--skip-seed` flag to skip the seeding process.

**Important:** If you're not using Docker to run this app, you need to configure the connection strings of the database servers (e.g. Redis, PostgreSQL) via the environment variables.

### To seed the database

```bash
pnpm exec prisma db seed
```

**Important:** Make sure to write idempotent seed scripts!

Resetting the database also runs the seed automatically.

```bash
pnpm exec prisma migrate reset
```

## Session Management with Supertokens

This boilerplate makes use of [SuperTokens](https://supertokens.com/) to handle sessions (with cookies) because security is very hard. The folks from Supertokens know really well what they're doing and it'd be in your best interest to know how this topic should be handled properly. Here are some relevant resources:
Expand Down
7 changes: 5 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ services:
- '8080:8080'
- '9229:9229'
tty: true
environment:
POSTGRES_CONNECTION_URL: postgresql://postgres:password@db:5432/db
REDIS_CONNECTION_URL: redis://redis

db:
image: postgres:15-alpine
Expand All @@ -34,7 +37,7 @@ services:

# https://www.pgadmin.org/docs/pgadmin4/6.5/container_deployment.html
pgadmin:
image: dpage/pgadmin4:6
image: dpage/pgadmin4:7.4
user: root
restart: always
ports:
Expand Down Expand Up @@ -64,7 +67,7 @@ services:
- REDIS_HOSTS=local:redis:6379

supertokens:
image: supertokens/supertokens-postgresql:5.0
image: supertokens/supertokens-postgresql:6.0
user: root
restart: always
environment:
Expand Down
50 changes: 25 additions & 25 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,28 +14,28 @@
"generate:gql-types": "graphql-codegen"
},
"dependencies": {
"@apollo/server": "4.7.2",
"@godaddy/terminus": "4.12.0",
"@apollo/server": "4.7.5",
"@godaddy/terminus": "4.12.1",
"@graphql-tools/load-files": "7.0.0",
"@graphql-tools/merge": "9.0.0",
"@graphql-tools/schema": "10.0.0",
"bcryptjs": "2.4.3",
"cookie-parser": "1.4.6",
"cors": "2.8.5",
"dataloader": "2.2.2",
"dotenv": "16.1.4",
"dotenv": "16.3.1",
"express": "4.18.2",
"graphql": "16.6.0",
"graphql": "16.7.1",
"graphql-depth-limit": "1.1.0",
"graphql-redis-subscriptions": "2.6.0",
"graphql-scalars": "1.22.1",
"graphql-scalars": "1.22.2",
"graphql-subscriptions": "2.0.0",
"graphql-ws": "5.13.1",
"graphql-ws": "5.14.0",
"helmet": "7.0.0",
"ioredis": "5.3.2",
"kysely": "0.25.0",
"pg": "8.11.0",
"supertokens-node": "14.1.1",
"kysely": "0.26.1",
"pg": "8.11.1",
"supertokens-node": "14.1.3",
"tsconfig-paths": "4.2.0",
"uuid": "9.0.0",
"ws": "8.13.0",
Expand All @@ -45,36 +45,36 @@
"@graphql-codegen/add": "5.0.0",
"@graphql-codegen/cli": "4.0.1",
"@graphql-codegen/introspection": "4.0.0",
"@graphql-codegen/typescript": "4.0.0",
"@graphql-codegen/typescript-resolvers": "4.0.0",
"@rushstack/eslint-patch": "1.3.0",
"@graphql-codegen/typescript": "4.0.1",
"@graphql-codegen/typescript-resolvers": "4.0.1",
"@rushstack/eslint-patch": "1.3.2",
"@types/bcryptjs": "2.4.2",
"@types/cookie-parser": "1.4.3",
"@types/cors": "2.8.13",
"@types/express": "4.17.17",
"@types/graphql-depth-limit": "1.1.3",
"@types/gulp": "4.0.11",
"@types/node": "20.2.5",
"@types/gulp": "4.0.13",
"@types/node": "20.4.2",
"@types/pg": "8.10.2",
"@types/uuid": "9.0.1",
"@types/ws": "8.5.4",
"@typescript-eslint/eslint-plugin": "5.59.9",
"@typescript-eslint/parser": "5.59.9",
"eslint": "8.42.0",
"@types/uuid": "9.0.2",
"@types/ws": "8.5.5",
"@typescript-eslint/eslint-plugin": "6.1.0",
"@typescript-eslint/parser": "6.1.0",
"eslint": "8.45.0",
"eslint-config-prettier": "8.8.0",
"eslint-plugin-import": "2.27.5",
"gulp": "4.0.2",
"gulp-run-command": "0.0.10",
"husky": "8.0.3",
"lint-staged": "13.2.2",
"prettier": "2.8.8",
"prisma": "4.15.0",
"prisma-kysely": "1.4.2",
"lint-staged": "13.2.3",
"prettier": "3.0.0",
"prisma": "5.0.0",
"prisma-kysely": "1.5.0",
"rimraf": "5.0.1",
"ts-node": "10.9.1",
"tsc-alias": "1.8.6",
"tsc-alias": "1.8.7",
"tsx": "3.12.7",
"typescript": "5.1.3"
"typescript": "5.1.6"
},
"pnpm": {
"patchedDependencies": {
Expand Down
Loading

0 comments on commit 5ad2a2d

Please sign in to comment.