-
Notifications
You must be signed in to change notification settings - Fork 158
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MVP of self-hosting #1718
MVP of self-hosting #1718
Conversation
…osting-auth-alternative
QA Wolf here! As you write new code it's important that your test coverage is keeping up. |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
|
||
# Build wasm | ||
WORKDIR /app/quadratic-core | ||
RUN echo 'Building wasm...' && wasm-pack build --target web --out-dir ../quadratic-client/src/app/quadratic-core --weak-refs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
--weak-refs
is not in Vercel / Amplify build
|
||
# Build the quadratic-shared | ||
WORKDIR /app | ||
RUN echo 'Building quadratic-shared...' && npm run compile --workspace=quadratic-shared |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
npm run compile is not in Vercel / Amplify build
const res = await fetch(file, { | ||
headers: { | ||
Authorization: `Bearer ${jwt}`, | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can't do this with s3!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BUGS
TODO
After merge
Self hosting auth alternative (Ory Kratos support)
AUTH_TYPE
in quadratic-api and switch between auth0 and ory based on the selectionAUTH_TYPE
in quadratic-client and switch between auth0 and ory based on the selectionSimple file storage
On the API side, you denote the storage method as an env var: STORAGE_TYPE=file-system # s3 or file-system. There is a storage abstraction within API that can switch between S3 and FileSystem. The abstracted functions are:
getFileUrl()
getPresignedFileUrl()
(reuse ENCRYPTION_KEY for uuid encryption in presigned URLs)uploadFile()
uploadMiddleware()
(express middleware for S3 and FileSystemOn the File Service side, the same env var STORAGE_TYPE is used to turn on a few new routes:
GET /storage/:key
Get any file in storage, validated by JWTPOST /storage/:key
Upload any file in storage, validated by JWTGET /storage/presigned/:key
Get any file in storage via a presigned key, validated by key decryptionEnvironment Variables to Add:
quadratic-api
quadratic-client
quadratic-files