2 months ago
Currently I have the following as my start command for a Next.js app:/bin/sh -c "export NEXT_PUBLIC_ASSET_PREFIX=$(cat ASSET_PREFIX) && node server.js"
ASSET_PREFIX is a file with the content being the public URL for CDN assets
sshing into the service and cat ASSET_PREFIX works fine
The problem is, NEXT_PUBLIC_ASSET_PREFIX doesn't appear to get set
3 Replies
2 months ago
Can't do a variable from Railway because the URL written to ASSET_PREFIX depends on RAILWAY_GIT_COMMIT_SHA which cannot be referenced from the UI (will just be blank)
2 months ago
oh wait NEXT_PUBLIC_ is done at build time
2 months ago
might be the problem hihi
Status changed to Solved brody • about 2 months ago