How to change OpenSSL version through nixpacks

How can I change OpenSSL version through nixpacks.toml ? Project ID: 02153a9e-0961-4df0-973f-a3d3ded857f4
19 Replies
Percy
Percy2y ago
Project ID: 02153a9e-0961-4df0-973f-a3d3ded857f4
jr
jr2y ago
Why are you looking to change the openssl version?
Daniel Seoane
Daniel Seoane2y ago
I am also interested in this. I've been trying for a few hours. In my case it is because of this: https://github.com/prisma/prisma/issues/16553#issuecomment-1353302617
GitHub
Support OpenSSL 3.0 for Alpine Linux · Issue #16553 · prisma/prisma
OpenSSL 3.0 is currently the default OpenSSL version in Alpine Linux 3.17 (see CHANGELOG). For Alpine Linux, Prisma only supports OpenSSL 1.X at this time. As a result, the following error is gener...
jr
jr2y ago
This doesn't happen with Nixpacks. You might be using a custom Dockerfile for umami? We have seen this a few times since the official node docker image has been updated. You should be able to simply remove the Dockerfile at the root of the repo https://canary.discord.com/channels/713503345364697088/1052353682617942086/1053376235809554482 For this issue, are you trying to install an older Ruby version?
Daniel Seoane
Daniel Seoane2y ago
It is not Umami, it is a personal project that uses Prisma, it does not have Dockerfile. I tried to deploy it but crashes because of Prisma, I thought it was that error.
jr
jr2y ago
project id?
dwaynemac
dwaynemac2y ago
Yes. I’m trying to install ruby 2.6.6
jr
jr2y ago
also what version of prisma?
Daniel Seoane
Daniel Seoane2y ago
845ec5e8-5758-4e22-8d65-c2cabba25c40 and prisma 4.4.0
dwaynemac
dwaynemac2y ago
I saw this PR https://github.com/railwayapp/nixpacks/pull/726 couldn’t we install openssl with nixpacks commands a la dockerfile fashion?
jr
jr2y ago
Yeah that PR isn't ideal at all and mainly a quick fix to unblock Ruby 2 users. I'm not sure what you mean by a la dockerfile fashion, but installing and using openssl 1 on ubuntu 22+ isn't super straightforward so going to take a bit more care in the solution
dwaynemac
dwaynemac2y ago
Got it
jr
jr2y ago
This issue is slightly different. It looks like you just need to run prisma generate before the build. Can you try changing your build script to prisma generate && remix build
Daniel Seoane
Daniel Seoane2y ago
I just try that, and failed. Returns the OpenSSL error from https://github.com/prisma/prisma/issues/16553#issuecomment-1353302617, check the build log
jr
jr2y ago
I see. Looking into it I believe the issue is with an older node version and prisma openssl version incompatibility. Any reason you are using node 14? If possible can you try updating the engines field of package.json to "node": ">=16"
Daniel Seoane
Daniel Seoane2y ago
Thank you very much! It looks like that's what it was and it's fixed now. 🤗
jr
jr2y ago
awesome! glad that worked 🙂 Fix is live so that older ruby versions will use a debian base image with openssl 1.1. Next week we will merge an update to the core ruby provider to make installing ruby much faster and work on the latest ubuntu version.
dwaynemac
dwaynemac2y ago
Thanks!