Browserless fails to create lockfile due to permissions

Hello everybody, I'm just testing railway, and so far I'm happy. However, I tried to attach a volume to one of my working services, and after configuring it properly to use the path it is raising a permissions error. The docker image is browserless, and the way I have it configured is with this environments:
PORT=3000
HOST=browserless
VERSION=latest
CONNECTION_TIMEOUT=-1
KEEP_ALIVE=true
WORKSPACE_EXPIRE_DAYS=1
ENABLE_CORS=true
CHROME_REFRESH_TIME=86400000
DEFAULT_BLOCK_ADS=true
FUNCTION_ENABLE_INCOGNITO_MODE=true
ENABLE_XVBF=true
USE_CHROME_STABLE=true
NODE_ENV=production
MAX_CONCURRENT_SESSIONS=1
DEFAULT_USER_DATA_DIR=${{RAILWAY_VOLUME_MOUNT_PATH}}
PORT=3000
HOST=browserless
VERSION=latest
CONNECTION_TIMEOUT=-1
KEEP_ALIVE=true
WORKSPACE_EXPIRE_DAYS=1
ENABLE_CORS=true
CHROME_REFRESH_TIME=86400000
DEFAULT_BLOCK_ADS=true
FUNCTION_ENABLE_INCOGNITO_MODE=true
ENABLE_XVBF=true
USE_CHROME_STABLE=true
NODE_ENV=production
MAX_CONCURRENT_SESSIONS=1
DEFAULT_USER_DATA_DIR=${{RAILWAY_VOLUME_MOUNT_PATH}}
6 Replies
Percy
Percy14mo ago
Project ID: a72d8bdb-382a-4b56-8b23-3b63f2858486
danielo515
danielo51514mo ago
a72d8bdb-382a-4b56-8b23-3b63f2858486
Brody
Brody14mo ago
the volumes are mounted as root and some docker images are not running themselves as root, to fix this you can try to set a service variable RAILWAY_RUN_UID to 0
danielo515
danielo51514mo ago
That will force the container to run as root? or will change the permimsions of the volume?
Brody
Brody14mo ago
it will run the image as UID 0 (the root user)
danielo515
danielo51514mo ago
Ok, will give that a try, thanks
Want results from more Discord servers?
Add your server