R
Railway2mo ago
Vishal

Bind mount a file

Is there a way to bind mount a file and if yes is there an option to edit the file or can you suggest me an alternative way to do
Solution:
you cannot bind mount a file, we do not support it
Jump to solution
13 Replies
Percy
Percy2mo ago
Please provide your project ID or reply with N/A. Thread will automatically be closed if no reply is received within 10 minutes. You can copy your project's id by pressing Ctrl/Cmd + K -> Copy Project ID.
Percy
Percy2mo ago
No project ID was provided. Closing thread.
Vishal
VishalOP2mo ago
I do not have any project, i'm here for help to know if there are any ways to bind mount a file
Adam
Adam2mo ago
Mind explaining what your use case is?
Vishal
VishalOP2mo ago
i have a go app and entire app works based on .yml config file this is how i deploy locally
docker run -d -p 8080:8080 \
-v ./example.yml:/app/example.yml \
exapp/example
docker run -d -p 8080:8080 \
-v ./example.yml:/app/example.yml \
exapp/example
Adam
Adam2mo ago
That doesn't clear anything up for me. Why do you need to bind mount a file?
Vishal
VishalOP2mo ago
it work for me in railway as I deploy using Dockerfile but if i want to create a template how should i do it and how should i allow other users to change the config as required
FROM golang:1.22.5-alpine
WORKDIR /app
COPY . .
RUN go mod download
RUN go build -o app .
RUN apk add --no-cache curl
RUN curl -o example.yml https://gist.githubusercontent.com/example/example/raw/example.yml
EXPOSE 8080
ENTRYPOINT ["./app"]
FROM golang:1.22.5-alpine
WORKDIR /app
COPY . .
RUN go mod download
RUN go build -o app .
RUN apk add --no-cache curl
RUN curl -o example.yml https://gist.githubusercontent.com/example/example/raw/example.yml
EXPOSE 8080
ENTRYPOINT ["./app"]
if there is a File Mount like we have Raw Editor option for env and JSON, can there be custom file content space where a config files like yml can be edited sorry for my bad explanation hope you understand can i get some help here
Solution
Brody
Brody2mo ago
you cannot bind mount a file, we do not support it
Vishal
VishalOP4w ago
any plans for supporting bind mount a file something like the dokploy has
Brody
Brody4w ago
we do not have any immediate plans to support bind mounts
Vishal
VishalOP4w ago
ok any alternative ways where i can deploy a template like this one where a user can edit the config file
Brody
Brody4w ago
you would want to expose the needed config via environment variables
Vishal
VishalOP4w ago
thanks, It worked
Want results from more Discord servers?
Add your server