Bind mount a file
vishalkadam47
HOBBYOP

a year ago

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

16 Replies

vishalkadam47
HOBBYOP

a year ago

I do not have any project, i'm here for help to know if there are any ways to bind mount a file


a year ago

Mind explaining what your use case is?


vishalkadam47
HOBBYOP

a year ago

i have a go app and entire app works based on .yml config file


vishalkadam47
HOBBYOP

a year ago

this is how i deploy locally

docker run -d -p 8080:8080 \
  -v ./example.yml:/app/example.yml \
  exapp/example

a year ago

That doesn't clear anything up for me. Why do you need to bind mount a file?


vishalkadam47
HOBBYOP

a year 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"]

vishalkadam47
HOBBYOP

a year ago

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


vishalkadam47
HOBBYOP

a year ago

sorry for my bad explanation hope you understand


vishalkadam47
HOBBYOP

a year ago

can i get some help here


a year ago

you cannot bind mount a file, we do not support it


vishalkadam47
HOBBYOP

a year ago

any plans for supporting bind mount a file something like the dokploy has


a year ago

we do not have any immediate plans to support bind mounts


vishalkadam47
HOBBYOP

a year ago

ok


vishalkadam47
HOBBYOP

a year ago

any alternative ways where i can deploy a template like this one where a user can edit the config file


a year ago

you would want to expose the needed config via environment variables


vishalkadam47
HOBBYOP

a year ago

thanks, It worked


Loading...