Skip to content

Commit

Permalink
build: update docker build & start.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
yuler committed Oct 10, 2023
1 parent c5d9182 commit 7d354a1
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 10 deletions.
23 changes: 14 additions & 9 deletions prisma/seed.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,21 @@ async function seed() {

async function seedUsers() {
console.time('🔑 Created users...')
// TODO: skip exist
await prisma.user.create({
data: {
email: '[email protected]',
username: 'apibeer',
password: {
create: { hash: await hash('123456') },
try {
await prisma.user.create({
data: {
email: '[email protected]',
username: 'apibeer',
password: {
create: { hash: await hash('123456') },
},
},
},
})
})
}
catch (error) {
// Maybe exist
console.log(error)
}
console.timeEnd('🔑 Created users...')
}

Expand Down
2 changes: 1 addition & 1 deletion start.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/sh

set -ex
pnpm dlx prisma migrate deploy
npx prisma migrate deploy
node .output/server/index.mjs

0 comments on commit 7d354a1

Please sign in to comment.