I’m trying to deploy a Deno app — you can see it here: https://github.com/RoyalIcing/postage-stamp
I require reading a local font file, and so it hits this error when deploying:
error: Uncaught (in promise) PermissionDenied: Requires read access to “./inter-font/Inter-Regular.ttf”, run again with the --allow-read flag
Is there a way to change the flags passed?
kurt
March 31, 2021, 4:00pm
2
We need to replace our Deno builder, it’s a little stale. For now, it’s best to use a Dockerfile. Just add a Dockerfile
to your directory like this:
FROM hayd/deno:alpine-1.8.2
ENV PORT=8080
EXPOSE 8080
WORKDIR /app
USER deno
ADD . .
RUN deno cache server.ts
CMD ["run", "--allow-read", "server.ts"]
Then comment out these two lines in your fly.toml
:
# [build]
# builder = "flyio/builder"
You should be good to go. You can change the CMD
line to do whatever you need.
FYI, Deno now has official Docker builds.
Adding this alternate build info to the fly.io docs (with this example) would have been super helpful.
kurt
July 1, 2021, 5:28pm
4
Oh good call! The docs are open source if you’re feeling ambitious: GitHub - superfly/docs
I don’t have a moment to work on that right now. I would have liked to file an issue on the docs repo to help remind you (its where I went first), but that repo disallows issues.
kurt
July 1, 2021, 8:59pm
6
Oh this forum is a great place to report it. Keeping up with github issues across projects is wizardry we haven’t learned yet.