whitetown
whitetown
RRailway
Created by whitetown on 9/11/2024 in #✋|help
overwrite files during deploy
Is it possible to overwrite a file(files) during deployment? i.e. based on env variable I would like to replace some files in /public folder. /images/ /public/ /src/ package.json etc. "build": "node copyfiles.js && next build", copyfiles.js:
const fs = require('fs')
if (process.env.NEXT_PUBLIC_THEME) {
fs.cpSync(`images/${process.env.NEXT_PUBLIC_THEME}/`, 'public/images', { recursive: true })
}
const fs = require('fs')
if (process.env.NEXT_PUBLIC_THEME) {
fs.cpSync(`images/${process.env.NEXT_PUBLIC_THEME}/`, 'public/images', { recursive: true })
}
it does not produce any error but files are not copied. locally it works. maybe files are read only?
31 replies
RRailway
Created by whitetown on 7/10/2024 in #✋|help
NextJS strange high memory usage
No description
2 replies
RRailway
Created by whitetown on 6/10/2024 in #✋|help
previous deployment crash
When I deploy the API (express, nodejs, socketio) everything goes well, but right before the new deployment will replace the old one, I see on the dashboard and I get an email notification
Deployment crashed for [service name] in [project name]! why this happens? is there something I can do? project id: b799250d-dd7b-47bb-be65-0ae878afd304
39 replies
RRailway
Created by whitetown on 5/24/2024 in #✋|help
could someone help me with volumes?
Hello, could someone help me with volumes? I used this code to upload the file to temp dir (it's working): const tempDir = fs.mkdirSync(path.join(os.tmpdir(), String(new Date().getTime())), { recursive: true }) const result = [] for (const file of files) { const filePath = path.join(tempDir, file.originalname) fs.writeFileSync(filePath, file.buffer) result.push(filePath) } return result now I added a volume. the mount path initially was /files , i.e. const tempDir = '/files' then I have tried to change it to /app/files , i.e. const tempDir = '/app/files' no luck it cannot create a file there
43 replies
RRailway
Created by whitetown on 1/18/2024 in #✋|help
what is the path for ffmpeg and ffprobe?
I defined these (found on discord) but still getting error "Error: Cannot find ffprobe" FFMPEG_PATH=/bin/ffmpeg FFPROBE_PATH=/bin/ffprobe
9 replies