mollersuite / monofile

File sharing over the Discord CDN
https://fyle.uk
The Unlicense
18 stars 3 forks source link

unify configuration (use environment variables) and dockerize #62

Closed cirroskais closed 2 months ago

cirroskais commented 2 months ago

Sponsored by MadHouse Labs:tm:

nbitzz commented 2 months ago

added #22 here because this solves it by doing the exact opposite of what #22 suggests

cirroskais commented 2 months ago

almost ready for review; only issue currently standing is that assets are not copied over to the image image

nbitzz commented 2 months ago

Man i should just merge this shoulndt i

nbitzz commented 2 months ago

@Jack5079 Oi

Jack5079 commented 2 months ago

So damn true!

cirroskais commented 2 months ago

Lgtm

nbitzz commented 2 months ago

i dotn fgjuicking know just merge it

nbitzz commented 2 months ago

We can like fix the API mounting later right now idgaf

cirroskais commented 2 months ago

error while creating account:

file:///usr/src/app/node_modules/@hono/node-server/dist/index.mjs:151
  for (const [k, v] of headers) {
                       ^

TypeError: headers is not iterable
    at buildOutgoingHttpHeaders (file:///usr/src/app/node_modules/@hono/node-server/dist/index.mjs:151:24)
    at responseViaResponseObject (file:///usr/src/app/node_modules/@hono/node-server/dist/index.mjs:315:27)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
cirroskais commented 2 months ago

currently deployed at https://monofile.dev.madhouselabs.net/ go crazy

Jack5079 commented 2 months ago

image

cirroskais commented 2 months ago
TypeError: AuthTokens.find is not a function
    at getToken (file:///usr/src/app/out/server/lib/auth.js:36:23)
    at Module.validate (file:///usr/src/app/out/server/lib/auth.js:39:12)
    at Module.getFromToken (file:///usr/src/app/out/server/lib/accounts.js:49:22)
    at getAccount (file:///usr/src/app/out/server/lib/middleware.js:9:33)
    at dispatch (file:///usr/src/app/node_modules/hono/dist/compose.js:29:23)
    at file:///usr/src/app/node_modules/hono/dist/compose.js:6:12
    at file:///usr/src/app/node_modules/hono/dist/hono-base.js:226:31
    at Hono.dispatch (file:///usr/src/app/node_modules/hono/dist/hono-base.js:236:7)
    at fetch (file:///usr/src/app/node_modules/hono/dist/hono-base.js:60:19)
    at Server.<anonymous> (file:///usr/src/app/node_modules/@hono/node-server/dist/index.mjs:362:13)
nbitzz commented 2 months ago

AAAAAAAAAAAAAAAAAAAAa

nbitzz commented 2 months ago

error while creating account:

file:///usr/src/app/node_modules/@hono/node-server/dist/index.mjs:151
  for (const [k, v] of headers) {
                       ^

TypeError: headers is not iterable
    at buildOutgoingHttpHeaders (file:///usr/src/app/node_modules/@hono/node-server/dist/index.mjs:151:24)
    at responseViaResponseObject (file:///usr/src/app/node_modules/@hono/node-server/dist/index.mjs:315:27)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

Pull latest commit to api-v1

cirroskais commented 2 months ago

deployed

nbitzz commented 2 months ago
TypeError: AuthTokens.find is not a function
    at getToken (file:///usr/src/app/out/server/lib/auth.js:36:23)
    at Module.validate (file:///usr/src/app/out/server/lib/auth.js:39:12)
    at Module.getFromToken (file:///usr/src/app/out/server/lib/accounts.js:49:22)
    at getAccount (file:///usr/src/app/out/server/lib/middleware.js:9:33)
    at dispatch (file:///usr/src/app/node_modules/hono/dist/compose.js:29:23)
    at file:///usr/src/app/node_modules/hono/dist/compose.js:6:12
    at file:///usr/src/app/node_modules/hono/dist/hono-base.js:226:31
    at Hono.dispatch (file:///usr/src/app/node_modules/hono/dist/hono-base.js:236:7)
    at fetch (file:///usr/src/app/node_modules/hono/dist/hono-base.js:60:19)
    at Server.<anonymous> (file:///usr/src/app/node_modules/@hono/node-server/dist/index.mjs:362:13)

Man i don't even know 😭

cirroskais commented 2 months ago
TypeError: AuthTokens.find is not a function
    at getToken (file:///usr/src/app/out/server/lib/auth.js:36:23)
    at Module.validate (file:///usr/src/app/out/server/lib/auth.js:39:12)
    at Module.getFromToken (file:///usr/src/app/out/server/lib/accounts.js:49:22)
    at getAccount (file:///usr/src/app/out/server/lib/middleware.js:9:33)
    at dispatch (file:///usr/src/app/node_modules/hono/dist/compose.js:29:23)
    at file:///usr/src/app/node_modules/hono/dist/compose.js:6:12
    at file:///usr/src/app/node_modules/hono/dist/hono-base.js:226:31
    at Hono.dispatch (file:///usr/src/app/node_modules/hono/dist/hono-base.js:236:7)
    at fetch (file:///usr/src/app/node_modules/hono/dist/hono-base.js:60:19)
    at Server.<anonymous> (file:///usr/src/app/node_modules/@hono/node-server/dist/index.mjs:362:13)

Man i don't even know 😭

i was stupid and set tokens.json to " {} " and not " [] " my fault og

you should probably make it... make those files. if they dont exist

nbitzz commented 2 months ago
TypeError: AuthTokens.find is not a function
    at getToken (file:///usr/src/app/out/server/lib/auth.js:36:23)
    at Module.validate (file:///usr/src/app/out/server/lib/auth.js:39:12)
    at Module.getFromToken (file:///usr/src/app/out/server/lib/accounts.js:49:22)
    at getAccount (file:///usr/src/app/out/server/lib/middleware.js:9:33)
    at dispatch (file:///usr/src/app/node_modules/hono/dist/compose.js:29:23)
    at file:///usr/src/app/node_modules/hono/dist/compose.js:6:12
    at file:///usr/src/app/node_modules/hono/dist/hono-base.js:226:31
    at Hono.dispatch (file:///usr/src/app/node_modules/hono/dist/hono-base.js:236:7)
    at fetch (file:///usr/src/app/node_modules/hono/dist/hono-base.js:60:19)
    at Server.<anonymous> (file:///usr/src/app/node_modules/@hono/node-server/dist/index.mjs:362:13)

Man i don't even know 😭

i was stupid and set tokens.json to " {} " and not " [] " my fault og

you should probably make it... make those files. if they dont exist

if it fails it just. doesn't gaf and sets the authtoken array to [] so like it'll happen eventually anywaaaay

nbitzz commented 2 months ago

We should really have just used SQL why didnt we monofile from scratch

nbitzz commented 2 months ago

Ok so yeah it basically works we can merge right

nbitzz commented 2 months ago

Switching to mongodb

cirroskais commented 2 months ago

LGTM

cirroskais commented 2 months ago

@nbitzz mergeeeee

nbitzz commented 2 months ago

AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH

nbitzz commented 2 months ago

@Jack5079 Monobot for automatic deployments of monofile whwene>> Maybe i should do that actually