AgentGPT
AgentGPT copied to clipboard
Cannot reach database in docker
Please check that this issue hasn't been reported before.
- [X] I searched previous Bug Reports didn't find any similar reports.
Expected Behavior
Platform Container is able to reach the database container on creation
Current behaviour
During docker-compose up --build exaction the following error message shows up that the application is unable to talk to its database on docker.
next |
next | Specify a schema
next | $ prisma migrate deploy --schema=./schema.prisma
next |
next | Environment variables loaded from .env
next | Prisma schema loaded from prisma/schema.prisma
next | Datasource "db": MySQL database "reworkd_platform" at "db:3306"
next |
next | Error: P1001: Can't reach database server at db
:3306
next |
next | Please make sure your database server is running at db
:3306
.
Steps to reproduce
Deploy the container's with docker-compose up --build
Possible solution
No response
Which Operating Systems are you using?
- [ ] Android
- [ ] iPhone/iPad
- [X] Linux
- [ ] 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.
Was able to solve this by changing the .env file DATABASE_PORT
to 3307. We need to change that in the .env.example
Edit: when the db port at .env and docker-compose is changed, db server is found, but it seems, that there is a prisma error:
db | 2023-05-25T09:42:10.938133Z 9 [Warning] [MY-013360] [Server] Plugin sha256_password reported: ''sha256_password' is deprecated and will be removed in a future release. Please use caching_sha2_password instead'
next |
next | Error: Migration engine error:
next | Error querying the database: Unknown authentication plugin `sha256_password'.
next |
next | Environment variables loaded from .env
next | Prisma schema loaded from prisma/schema.prisma
Hello could you guys retry the setup file and then try running docker-compose up --build
Hello, @JumpyWizard404 Could retry the setup script ?? We have made some updates that may resolve this issue!! I will be closing this issue due to inactivity soon. If you're still having issues please feel free to reopen this issue!!
I have met the same problem and I tried to modify the file ".env" in the db container, but it seems unavailing.