!NhAsaYbbgmzHtXTPQJ:funklause.de

Nix NodeJS

209 Members
60 Servers

You have reached the beginning of time (for this room).


SenderMessageTime
12 Nov 2023
@lily:lily.flowersLily Foster
In reply to @peter-lustig:matrix.org

Here is my current systemd service:

systemd.services.myservice = {
    wantedBy = ["multi-user.target"];
    after = ["network-online.target"];
    serviceConfig = {
      Type = "simple";
      ExecStart = "PORT=5173 ${pkgs.nodejs_20}/bin/node .";
      WorkingDirectory = inputs.myservice.packages.${pkgs.system}.default;
      Restart = "always";
    };
  };
(also you probably want that to be wants = [ "network-online.target"] instead of after, since the former sets up an explicitly dependency but after only does ordering. it works for now, but we're going to be making multi-user.target no longer depend on network-online.target at some point)
13:24:21
@szucsitg:matrix.orgszucsitg
In reply to @lily:lily.flowers
can you ping me in like 5 hours? i'm running an event at the moment, but can help later
Maybe now?
13:25:35
@lily:lily.flowersLily Foster
In reply to @szucsitg:matrix.org
Maybe now?
yeah sure! apologies for forgetting yesterday (was a busy day)
13:25:52
@peter-lustig:matrix.orgpeter-lustig
In reply to @peter-lustig:matrix.org
The unit myapp.service has entered the 'failed' state with result 'exit-code'.
Nov 12 14:21:52 server systemd[1]: Failed to start My application
░░ Subject: A start job for unit myapp.service has failed
░░ Defined-By: systemd
░░ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
░░ 
░░ A start job for unit myapp.service has finished with a failure.
░░ 
░░ The job identifier is 1062533 and the job result is failed.
as you can see it does not give me any info Cobalt
13:25:57
@lily:lily.flowersLily Fostercan you share your updated service definition?13:26:46
@lily:lily.flowersLily Fosterthat usually means systemd couldn't exec the command at all13:27:04
@peter-lustig:matrix.orgpeter-lustig
systemd.services.myapp = {
    description = "My application";
    wantedBy = ["multi-user.target"];
    wants = ["network-online.target"];
    serviceConfig = {
      Type = "simple";
      Environment = "PORT=5173";
      ExecStart = "${pkgs.nodejs_20}/bin/node .";
      WorkingDirectory = inputs.myapp.packages.${pkgs.system}.default;
      Restart = "always";
    };
  };
13:27:43
@lily:lily.flowersLily Foster
In reply to @szucsitg:matrix.org
Maybe now?
So I was meaning the actual like workspaces field in package.json
13:28:51
@lily:lily.flowersLily Fosterif you're not using it, then they are entirely separate packages13:28:57
@lily:lily.flowersLily Foster
In reply to @peter-lustig:matrix.org
systemd.services.myapp = {
    description = "My application";
    wantedBy = ["multi-user.target"];
    wants = ["network-online.target"];
    serviceConfig = {
      Type = "simple";
      Environment = "PORT=5173";
      ExecStart = "${pkgs.nodejs_20}/bin/node .";
      WorkingDirectory = inputs.myapp.packages.${pkgs.system}.default;
      Restart = "always";
    };
  };
Could you share /etc/systemd/system/services/myapp.service from the system too, so we can see what like the workingdirectory and stuff expanded to?
13:29:28
@peter-lustig:matrix.orgpeter-lustig
In reply to @lily:lily.flowers
Could you share /etc/systemd/system/services/myapp.service from the system too, so we can see what like the workingdirectory and stuff expanded to?
yes
13:31:32

Show newer messages


Back to Room ListRoom Version: 6