-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Migrate signalling server away from Heroku free tier #2
Comments
[Edited: moved comment contents into issue description] |
Railway's Nixpacks automatically-deduced build plan did not work:
Going to look at setting up the build plan manually or help prod the Nixpack in the right direction |
Why is Nixpacks trying to read a Line 2 in c0fd1ee
|
Looks like the corresponding Nixpacks configuration for RustConfig's |
Environment variable |
Now we're further ahead in the deployment. The next error is:
Full logs:
|
I speculate the error is coming from the rust nix overlay due to the |
Tried installing railway cli to my NixOS but my nixpkgs might be too old. Trying to install it with the Tried installing nixpacks through nix flakes, but failing with:
I suspect it's because in the check phase, it's using rustfmt outside of cargo, and therefore isn't aware of the edition set by {
description = "fix-my-dango";
inputs = {
flake-utils.url = "github:numtide/flake-utils";
nixpacks.url = "github:railwayapp/nixpacks?rev=a8bf45a551e6be451633da04ba1d763c997ccc32";
};
outputs = { self, nixpkgs, flake-utils, nixpacks }:
flake-utils.lib.eachDefaultSystem (system: {
devShell = pkgs.mkShell {
nativeBuildInputs = with pkgs; [
(nixpacks.packages.${system}.nixpacks.overrideAttrs (finalAttrs: previousAttrs: { doCheck = false; }))
];
};
});
} Strangely, running nixpacks locally gives me Next up, I need to install docker onto my system. |
Running |
Fails locally
|
Setting |
After updating nixos, I now get pass the |
Indeed if I follow https://github.com/railwayapp/nixpacks/blob/1a37a464e187781d5670d8b0abf9d3a823574663/CONTRIBUTING.md#debugging and run |
If that rust-toolchain is added via When I log the However, when I log the |
Ah, looks like I was only looking at the |
Instead, when generating the dockerfile for the build plan, it generates a |
This is because of |
I suspect it's a regression introduced in railwayapp/nixpacks@be4c282 |
Temporary workaround: I'll see if I can specify an older NixPacks before this commit |
Even with that part commented out, I still get an error as it seems it's looking for the rust-toolchain file in the wrong directory. |
Looks like we need the rust-toolchain before the setup phase, as that's when the nix file (with the rust overlay) is being run. |
Change of plans do to the lack of time. I'll try other builders available on railway, and if that fails, will look at creating a custom nix flake file. |
Using dream2nix to nixify this project. Hitting a problem where it thinks my patches are part of the workspace and gets confused. |
Wait, I see nixpacks has an example of using rust with custom toolchain. I'm going to try run that example. |
Still fails for me. Looks like examples/rust-custom-toolchain is not covered by the tests. |
dream2nix didn't seem to work - it got confused when resolving the impurities for a patch, saying that it thinks it's in a workspace when it's not. Algoods, since dream2nix is still in its very early stages as well. Going to try out cargo2nix. |
Fumbled around for a while with cargo2nix due to a typo I had when specifying a custom Then I created a simple Dockerfile to run Got an error when using nixos-21.11
but this error looks familiar - it's probably because I ran cargo2nix that is only compatible with newer versions of nix. Indeed, running Updating the dockerfile to use a more up-to-date base image with a newer version of nix (nixos-22.05) solved it. It's now building on railway now. Next step would be to maybe use multi-stage builds to only copy over the actual runtime dependencies and not the build time dependencies. |
Multi-stage build done. Thank you https://marcopolo.io/code/nix-and-small-containers/ for the guide. Next up, I'll point the code to the new signalling server. |
Hmmm, server websocket seems to connect fine, but then the client http request doesn't go through... perhaps it's something to do with the SSL redirection? |
Consider either upgrade or move to another PaaS.
Going to move to railway.
Plan:
Places to update in the code:
dango-tribute/RustConfig
Line 1 in c0fd1ee
dango-tribute/client/src/main.rs
Line 149 in c0fd1ee
dango-tribute/server/src/main.rs
Line 88 in 456307e
To check:
The text was updated successfully, but these errors were encountered: