codelitdev / medialit

Upload, process and optimise your media files on a AWS S3 compatible storage
https://medialit.cloud
GNU Affero General Public License v3.0
7 stars 3 forks source link

Docker + Next 14 + Next Auth #71

Closed rajat1saxena closed 8 months ago

rajat1saxena commented 8 months ago

Following things were not working.

  1. In the Dockerfile, we were not copying some newer files.

  2. The middleware.ts cannot call node modules like mongoose as the middleware runs on edge. Edge runtimes does not support running node based API like net/fs. Read more See how it was affecting us: https://twitter.com/rajatsx/status/1745854971831353799

To solve this, we have fallen back to using [...nextauth].ts files instead of middleware.ts. I have removed that file from project.