R
Railway10mo ago
loyahdev

I need to pay $10,000 for any amount of extra storage?!

I was told I could request storage using a pro account but not this amount of money for such a small amount of storage. Is there anything I can do?
58 Replies
Percy
Percy10mo ago
Project ID: N/A
loyahdev
loyahdevOP10mo ago
N/A
Brody
Brody10mo ago
how much storage did you need, and who told you that?
loyahdev
loyahdevOP10mo ago
The [email protected] email and I only needed 100gb of extra storage
Brody
Brody10mo ago
who specifically did you talk to?
loyahdev
loyahdevOP10mo ago
Jake
Brody
Brody10mo ago
jake cooper?
loyahdev
loyahdevOP10mo ago
No idea
No description
Brody
Brody10mo ago
well there you have it
loyahdev
loyahdevOP10mo ago
That just seems extremely outrageous as I’m not some enterprise company needing terabytes and stuff but alright.
Brody
Brody10mo ago
https://www.cloudflare.com/en-gb/developer-platform/r2/ is an option? but may i ask what you would like 100gb for?
loyahdev
loyahdevOP10mo ago
Extra file storage for my signing api Hmm I see I’ll definitely check that out
JustJake
JustJake10mo ago
Oh I must have entirely misread you I read something about shared storage and hit a macro in the email response. Do you just need your database bumped up storage wise?
loyahdev
loyahdevOP10mo ago
Yup just by 100gb to store my api files if that’s possible please
JustJake
JustJake10mo ago
Oh. EasyPeasy sorry about that 😵‍💫 Which service?
loyahdev
loyahdevOP10mo ago
lol no worries is it possible I can get it for the whole team for other projects? If not I’ll do my SamSign Main service
JustJake
JustJake10mo ago
api.samhubsign.xyz?
loyahdev
loyahdevOP10mo ago
Yup
JustJake
JustJake10mo ago
You don't seem to have a volume attached to it. You'll have to create one for me to bump it
loyahdev
loyahdevOP10mo ago
How would I do that might I ask?
JustJake
JustJake10mo ago
CMD + K -> Volume
Brody
Brody10mo ago
what storage have you been using up until now?
JustJake
JustJake10mo ago
^^
loyahdev
loyahdevOP10mo ago
Not much yet but my team has files that won’t expire and the api will be public to a few thousand people Which signing apps of around 3gb each
Brody
Brody10mo ago
think you misinterpreted my question, if you dont already have a volume, where have you been storing your files
loyahdev
loyahdevOP10mo ago
Just in the same directory area where my project files get copied to Which is the /app folder I think
Brody
Brody10mo ago
thats ephemeral storage, please create a volume on your service
loyahdev
loyahdevOP10mo ago
Oh ok I will What should be the mount path of my volume? Just / ?
JustJake
JustJake10mo ago
Wherever you're writing your stuff
Brody
Brody10mo ago
what folder do you save the certs to?
loyahdev
loyahdevOP10mo ago
I’ll just do it in the /app folder which all my project files are stored Alright the volume is setup
Brody
Brody10mo ago
you can't mount a volume there, so for now, mount the volume to /app/data just so cooper has a volume to grow, we can change the mount point later without effecting the size
loyahdev
loyahdevOP10mo ago
Oh ok Done
JustJake
JustJake10mo ago
Resized ✅ Sorry for the heart attack
loyahdev
loyahdevOP10mo ago
No worries I got scarred for a second lol but thank you so much. And this would just be the same process for any other projects/services I would have? Later on
JustJake
JustJake10mo ago
Yup just flag us
loyahdev
loyahdevOP10mo ago
Amazing thanks Also how can I store my whole projects files in that volume instead of the /app folder now?
Brody
Brody10mo ago
alright I'm tagging out cooper you wouldn't want store store the entire project in the volume, only the files that need to persist
loyahdev
loyahdevOP10mo ago
I see but when storing what should I be doing?
Brody
Brody10mo ago
so let's work on that, please show me some code thats responsible for saving the files to disk
loyahdev
loyahdevOP10mo ago
Sure one second
const htmlDirectory = path.join(__dirname, 'storage', 'html');
const htmlDirectory = path.join(__dirname, 'storage', 'html');
const storage = multer.diskStorage({
destination: function (req, file, cb) {
if (file.fieldname === 'p12' || file.fieldname === 'mobileprovision') {
cb(null, 'storage/certs');
}
else if (file.fieldname === 'ipa') {
cb(null, 'storage/temp');
}
},
filename: function (req, file, cb) {
let ext = path.extname(file.originalname);
let randomName = crypto.randomBytes(16).toString('hex');
cb(null, `${randomName}${ext}`);
}
});
const storage = multer.diskStorage({
destination: function (req, file, cb) {
if (file.fieldname === 'p12' || file.fieldname === 'mobileprovision') {
cb(null, 'storage/certs');
}
else if (file.fieldname === 'ipa') {
cb(null, 'storage/temp');
}
},
filename: function (req, file, cb) {
let ext = path.extname(file.originalname);
let randomName = crypto.randomBytes(16).toString('hex');
cb(null, `${randomName}${ext}`);
}
});
im basically just using dirname right now for the starting point of where my script is stored
Brody
Brody10mo ago
yeah that's fine are you using nixpacks?
loyahdev
loyahdevOP10mo ago
currently dockerfile but im free to switch over if needed
Brody
Brody10mo ago
no need just gathering information to give you the best answer, what does the last workdir read?
loyahdev
loyahdevOP10mo ago
WORKDIR /app
COPY . /app
WORKDIR /app
COPY . /app
Brody
Brody10mo ago
alright, what's the current mount point
loyahdev
loyahdevOP10mo ago
no idea i would have never changed it though heres my whole file if needed:
FROM node:latest

# Install unzip, zip, and any other dependencies you might need
RUN apt-get update && apt-get install -y unzip zip

# Copy your application source
WORKDIR /app
COPY . /app

# Install Node.js dependencies
RUN npm install

# Expose port and start application
EXPOSE 3000
CMD ["node", "app.js"]
FROM node:latest

# Install unzip, zip, and any other dependencies you might need
RUN apt-get update && apt-get install -y unzip zip

# Copy your application source
WORKDIR /app
COPY . /app

# Install Node.js dependencies
RUN npm install

# Expose port and start application
EXPOSE 3000
CMD ["node", "app.js"]
Brody
Brody10mo ago
no idea? you just set the volumes mount point 5 minutes ago
loyahdev
loyahdevOP10mo ago
oh woops /app/data
Brody
Brody10mo ago
change to /app/storage/certs
loyahdev
loyahdevOP10mo ago
done
Brody
Brody10mo ago
okay you should be good to go, but to check, upload something that would end up in storage/certs and then redeploy, once that's done, check if the file is still there
loyahdev
loyahdevOP10mo ago
alrighty ill have to check tomorrow but thank you for everything
Brody
Brody10mo ago
no problem @loyah just wanna check back in, has that mount path worked for you?
loyahdev
loyahdevOP10mo ago
yup its worked great and the storage is working correctly thank you for the concern
Brody
Brody10mo ago
you have confirmed this by uploading something, redeploying, then checking if the file is still there?
loyahdev
loyahdevOP10mo ago
Yup I have it works
Brody
Brody10mo ago
great!
Want results from more Discord servers?
Add your server