R
Railwayβ€’2y ago
apz

How do I use the latest version of Deno 1.34.1 using the nixpacks.toml (or) railway.toml

Hi β€” 1.34.1 landed a fix for node:http2(https://github.com/denoland/deno/issues/16923), which I need to use "unfurl.js" (an npm library that uses it). deno upgrade as a build command doesn't work. Can't figure out how to tell nixpacks.toml / railway.toml to install a specific / latest version of deno. This is all I want from the Dockerfile: FROM denoland/deno:1.34.1 dockerfile here: https://github.com/denoland/deno_docker#as-a-dockerfile If someone could let me know how I can update the deno runtime without having to deal with a dockerfile, I'd really appreciate it.
GitHub
Issues Β· denoland/deno
A modern runtime for JavaScript and TypeScript. Contribute to denoland/deno development by creating an account on GitHub.
Solution:
It looks like the latest version of Deno available in NixOS (https://search.nixos.org/packages?channel=22.11&show=deno&from=0&size=50&sort=relevance&type=packages&query=deno) is quite old, which we can sadly do nothing about - your best bet may be using a Dockerfile.
Jump to solution
10 Replies
Percy
Percyβ€’2y ago
Project ID: f5d8c623-2522-4045-9827-69e1cc2efaa3
apz
apzOPβ€’2y ago
f5d8c623-2522-4045-9827-69e1cc2efaa3
Solution
root
rootβ€’2y ago
It looks like the latest version of Deno available in NixOS (https://search.nixos.org/packages?channel=22.11&show=deno&from=0&size=50&sort=relevance&type=packages&query=deno) is quite old, which we can sadly do nothing about - your best bet may be using a Dockerfile.
apz
apzOPβ€’2y ago
okay, πŸ‘πŸ½
Brody
Brodyβ€’2y ago
if you need any help with the dockerfile, we will be here!
apz
apzOPβ€’2y ago
πŸ™ŒπŸ½ β€” it worked!!! (ChatGPT coming in handy with the assist)
Brody
Brodyβ€’2y ago
oh god an ai generated dockerfile, can we see it?
apz
apzOPβ€’2y ago
Sure πŸ˜… :
FROM denoland/deno:latest

# The port that your application listens to.
EXPOSE 8080

WORKDIR /app

# Prefer not to run as root.
USER deno

# Copy all files from the current directory on your local machine to the current directory in the Docker image.
COPY . .

# These steps will be re-run upon each file change in your working directory:
# Compile the main app so that it doesn't need to be compiled each startup/entry.
RUN deno cache ./src/main.ts

CMD ["deno", "task", "start"]
FROM denoland/deno:latest

# The port that your application listens to.
EXPOSE 8080

WORKDIR /app

# Prefer not to run as root.
USER deno

# Copy all files from the current directory on your local machine to the current directory in the Docker image.
COPY . .

# These steps will be re-run upon each file change in your working directory:
# Compile the main app so that it doesn't need to be compiled each startup/entry.
RUN deno cache ./src/main.ts

CMD ["deno", "task", "start"]
β–Ά erd --level 1
β”Œβ”€ deno.jsonc
β”œβ”€ Dockerfile
β”œβ”€ processedData
β”œβ”€ docs
β”œβ”€ README.md
β”œβ”€ deno.lock
β”œβ”€ rawData
β”œβ”€ assets
β”œβ”€ railway.json
β”œβ”€ src
β–Ά erd --level 1
β”Œβ”€ deno.jsonc
β”œβ”€ Dockerfile
β”œβ”€ processedData
β”œβ”€ docs
β”œβ”€ README.md
β”œβ”€ deno.lock
β”œβ”€ rawData
β”œβ”€ assets
β”œβ”€ railway.json
β”œβ”€ src
src contains only one file for now β€” main.ts
Brody
Brodyβ€’2y ago
looks fine to me
root
rootβ€’2y ago
Remarkably, it seems as if ChatGPT knew what it was doing.
Want results from more Discord servers?
Add your server