Skip to content

Commit 19eafe2

Browse files
committed
Merge branch 'fix-prepare-deploy-server' into render-on-yaml
2 parents d6e462a + 3ab196a commit 19eafe2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+4205
-822
lines changed

.cspell.json

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,20 @@
22
"version": "0.2",
33
"language": "en",
44
"words": [
5-
"supabase",
6-
"direnv",
5+
"autoincrement",
76
"bunx",
8-
"qiita",
97
"coursemate",
10-
"safify",
11-
"notistack",
12-
"autoincrement",
138
"datasource",
9+
"direnv",
10+
"ECCS",
11+
"isready",
1412
"lockb",
13+
"notistack",
1514
"psql",
16-
"isready",
17-
"ECCS"
15+
"qiita",
16+
"safify",
17+
"supabase",
18+
"swiper"
1819
],
1920
"dictionaries": [
2021
"softwareTerms",
@@ -37,6 +38,7 @@
3738
"**/package.json",
3839
"**/bun.lockb",
3940
"**/*.svg",
40-
"**/migration.sql"
41+
"**/migration.sql",
42+
"**/data.json"
4143
]
4244
}

.github/workflows/keep-alive.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Keep Alive
22

33
on:
44
schedule:
5-
- cron: "*/5 * * * *"
5+
- cron: "*/2 * * * *"
66
workflow_dispatch:
77

88
env:

Makefile

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,9 @@ test: dev-db
4545

4646
prepare-deploy-web: copy-common
4747
cd web; bun install; bun run build
48-
prepare-deploy-server: copy-common
49-
cd server; bun install; npx prisma generate;
48+
prepare-deploy-server: copy-common sync-server generate-sql
5049
deploy-server:
51-
cd server; bun src/index.ts
50+
cd server; bun src/main.ts
5251

5352
docker: copy-common
5453
@# deferring `docker compose down`. https://qiita.com/KEINOS/items/532dc395fe0f89c2b574
@@ -95,16 +94,16 @@ spell-check:
9594
# Sync (install/update packages, generate prisma, etc)
9695

9796
sync-web:
98-
cd web; bun install
97+
cd web; bun install --frozen-lockfile
9998
# copy .env.sample -> .env only if .env is not there
10099

101100
sync-server:
102-
cd server; bun install
101+
cd server; bun install --frozen-lockfile
103102
cd server; bunx prisma generate
104103
# copy .env.sample -> .env only if .env is not there
105104

106105
sync-root:
107-
bun install
106+
bun install --frozen-lockfile
108107

109108

110109
# Static checks

biome.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@
1010
"useIgnoreFile": true
1111
},
1212
"files": {
13-
"ignore": ["bun.lockb", "server/target"]
13+
"ignore": ["bun.lockb", "server/target", "data.json"]
1414
}
1515
}

common/zod/schemas.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,8 @@ export const ShareRoomIDSchema = z.number();
102102

103103
export const ContentSchema = z
104104
.string()
105-
.min(1, { message: "Content must not be empty." });
105+
.min(1, { message: "Content must not be empty." })
106+
.max(255, { message: "Content is too big" });
106107

107108
export const MessageSchema = z.object({
108109
id: MessageIDSchema,

server/prisma/schema.prisma

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ model Slot {
7575

7676
model Enrollment {
7777
id Int @id @default(autoincrement())
78-
user User @relation(fields: [userId], references: [id])
78+
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
7979
userId Int
8080
course Course @relation(fields: [courseId], references: [id])
8181
courseId String

server/src/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
/common
2+
/seeds/data.json

web/bun.lockb

342 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)