AgentGPT icon indicating copy to clipboard operation
AgentGPT copied to clipboard

docker setup error

Open hitcxz opened this issue 2 years ago • 2 comments

Please check that this issue hasn't been reported before.

  • [X] I searched previous Bug Reports didn't find any similar reports.

Expected Behavior

setup success

Current behaviour

entrypoint.sh: line 8: ./wait-for-db.sh: Permission denied

! unknown or unexpected option: --name

Apply pending migrations to update the database schema in production/staging

Usage

$ prisma migrate deploy [options]

Options

-h, --help Display this help message --schema Custom path to your Prisma schema

Examples

Deploy your pending migrations to your production/staging database $ prisma migrate deploy

Specify a schema $ prisma migrate deploy --schema=./schema.prisma

Environment variables loaded from .env Prisma schema loaded from prisma/schema.prisma Datasource "db": MySQL database

Error: Prisma schema validation - (get-config wasm) Error code: P1012 error: Error validating datasource db: the URL must start with the protocol mysql://. --> schema.prisma:7 | 6 | provider = "mysql" 7 | url = env("DATABASE_URL") |

Validation Error Count: 1 [Context: getConfig]

Prisma CLI Version : 4.13.0 Environment variables loaded from .env Prisma schema loaded from prisma/schema.prisma

✔ Generated Prisma Client (4.13.0 | library) to ./node_modules/@prisma/client in 88ms You can now start using Prisma Client in your code. Reference: https://pris.ly/d/client

import { PrismaClient } from '@prisma/client'
const prisma = new PrismaClient()

[email protected] dev next dev

❌ Invalid environment variables: NEXT_PUBLIC_BACKEND_URL: Required

file:///next/src/env/client.mjs:22 throw new Error("Invalid environment variables"); ^

Error: Invalid environment variables at file:///next/src/env/client.mjs:22:9 at ModuleJob.run (node:internal/modules/esm/module_job:193:25)

Node.js v19.9.0

Steps to reproduce

Just run "./setup.sh --docker"

Possible solution

No response

Which Operating Systems are you using?

  • [ ] Android
  • [ ] iPhone/iPad
  • [ ] Linux
  • [X] macOS
  • [ ] Windows

Acknowledgements

  • [X] My issue title is concise, descriptive, and in title casing.
  • [X] I have searched the existing issues to make sure this bug has not been reported yet.
  • [X] I am using the latest version of AgentGPT.
  • [X] I have provided enough information for the maintainers to reproduce and diagnose the issue.

hitcxz avatar May 11 '23 09:05 hitcxz

I know the issue, I will make a pull request

lauralex avatar May 11 '23 15:05 lauralex

The issue is that the ./next/:/next/ volume binding in docker-compose.yml file will overwrite the LF line ending correction done by the dos2unix utility, because it will reuse the files in the host OS, which have the CRLF line ending.

lauralex avatar May 11 '23 15:05 lauralex