fix(docker): prisma client package

This commit is contained in:
oiov
2025-05-27 11:11:00 +08:00
parent 3301570213
commit cc4c6c5e96
4 changed files with 29 additions and 5 deletions

View File

@@ -38,6 +38,6 @@ SCREENSHOTONE_BASE_URL=https://shot.wr.do
# GitHub api token for getting gitHub stars count
GITHUB_TOKEN=
# Skip DB check and migration (only for docker)
SKIP_DB_CHECK=false
SKIP_DB_MIGRATION=false
# Skip DB check and migration (only for docker), default is true. if false, will check and migrate database each time start docker compose.
SKIP_DB_CHECK=true
SKIP_DB_MIGRATION=true

View File

@@ -38,7 +38,7 @@ RUN npm install -g pnpm
ENV NODE_ENV=production
ENV IS_DOCKER=true
RUN pnpm add npm-run-all dotenv prisma@5.17.0
RUN pnpm add npm-run-all dotenv prisma@5.17.0 @prisma/client@5.17.0
COPY --from=builder /app/public ./public
COPY --from=builder /app/prisma ./prisma

View File

@@ -3,7 +3,7 @@ title: Deploy Guide
description: Choose your deployment method
---
## Deploy with Vercel
## Deploy with Vercel (Recommended)
[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https://github.com/oiov/wr.do.git&project-name=wrdo&env=DATABASE_URL&env=AUTH_SECRET&env=RESEND_API_KEY&env=NEXT_PUBLIC_EMAIL_R2_DOMAIN&env=NEXT_PUBLIC_OPEN_SIGNUP&env=GITHUB_TOKEN)
@@ -11,6 +11,12 @@ Remember to fill in the necessary environment variables.
## Deploy with Docker Compose
<Callout type="warning" twClass="mt-4">
Please create your database instance before deployment.
Set `SKIP_DB_CHECK` and `SKIP_DB_MIGRATION` to `false` in the `.env` file, this will start the database check and migration.
</Callout>
Create a new folder and copy the `docker-compose.yml`、`.env` file to the folder.
```bash
@@ -24,3 +30,19 @@ Fill in the environment variables in the `.env` file, then:
```bash
docker compose up -d
```
## Deploy with Docker Compose (Local DB)
Create a new folder and copy the `docker-compose-localdb.yml`、`.env` file to the folder.
```bash
- wrdo
| - docker-compose.yml
| - .env
```
Fill in the environment variables in the `.env` file, then:
```bash
docker compose up -d
```

View File

@@ -21,6 +21,8 @@ services:
NEXT_PUBLIC_GOOGLE_ID: ${NEXT_PUBLIC_GOOGLE_ID}
SCREENSHOTONE_BASE_URL: ${SCREENSHOTONE_BASE_URL}
GITHUB_TOKEN: ${GITHUB_TOKEN}
SKIP_DB_CHECK: ${SKIP_DB_CHECK}
SKIP_DB_MIGRATION: ${SKIP_DB_MIGRATION}
depends_on:
- postgres
networks: