!NhAsaYbbgmzHtXTPQJ:funklause.de

Nix NodeJS

205 Members
59 Servers

Load older messages


SenderMessageTime
11 Nov 2023
@peter-lustig:matrix.orgpeter-lustig
In reply to @c0ba1t:matrix.org
Maybe? You have only posted an excerpt from an NGINX vhost config with an `example.com` domain and a systemd unit.
ok but I think that root = is useless then
22:04:53
@peter-lustig:matrix.orgpeter-lustigi need proxypass for the backend though right?22:06:42
@c0ba1t:matrix.orgCobaltYes22:08:33
@c0ba1t:matrix.orgCobaltDepending on the service you might also want `services.nginx.virtualHosts.<name>.locations.<name>.recommendedProxySettings` and `services.nginx.virtualHosts.<name>.locations.<name>.proxyPass`22:10:43
@c0ba1t:matrix.orgCobalt* Depending on the service you might also want `services.nginx.virtualHosts.<name>.locations.<name>.recommendedProxySettings` and `services.nginx.virtualHosts.<name>.locations.<name>.proxyPass`22:10:52
@c0ba1t:matrix.orgCobalt* Depending on the service you might also want `services.nginx.virtualHosts.<name>.locations.<name>.recommendedProxySettings` and `services.nginx.virtualHosts.<name>.locations.<name>.proxyWebsockets`22:11:11
12 Nov 2023
@peter-lustig:matrix.orgpeter-lustig ok Cobalt getting it started to fail 01:14:37
@peter-lustig:matrix.orgpeter-lustigthe systemd service01:14:39
@peter-lustig:matrix.orgpeter-lustig unfortunately there are no closer details01:14:45
@peter-lustig:matrix.orgpeter-lustig but I get bad gateway on nginx 01:16:50
@peter-lustig:matrix.orgpeter-lustigso idk01:16:53
@peter-lustig:matrix.orgpeter-lustigplease help if you have an idea01:53:06
@c0ba1t:matrix.orgCobaltThe NGINX bad gateway error is NGINX's way of reporting that it couldn't reach the service behind proxy pass.08:17:05
@c0ba1t:matrix.orgCobalt
In reply to @peter-lustig:matrix.org
the systemd service
You might want to look into the journal (journalctl -xeu ) to inspect your app logs.
08:18:18
@c0ba1t:matrix.orgCobalt* In reply to @peter-lustig:matrix.org the systemd service If your app öogs to stderr/stdout, you might want to look into the journal (journalctl -xeu ) to inspect your app logs08:19:24
@c0ba1t:matrix.orgCobalt* In reply to peter-lustig the systemd service If your app logs to stderr/stdout, you might want to look into the journal (journalctl -xeu ) to inspect your app logs 08:19:51
@peter-lustig:matrix.orgpeter-lustig
In reply to @c0ba1t:matrix.org

In reply to peter-lustig
the systemd service

If your app logs to stderr/stdout, you might want to look into the journal (journalctl -xeu ) to inspect your app logs

Yes, I am aware of that. But journalctl for the service only gives me `The unit has entered the 'failed' state with result 'exit-code'
13:10:21
@peter-lustig:matrix.orgpeter-lustig but i execute the command PORT=5173 node . and if I test that locally everything just works 13:11:59
@peter-lustig:matrix.orgpeter-lustig

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";
    };
  };
13:17:00
@c0ba1t:matrix.orgCobaltOkay, have you tried going to the workingdirectory and executing node there?13:19:10
@lily:lily.flowersLily Foster POST=5173 is not a command 13:19:20
@lily:lily.flowersLily Foster If you are trying to set an environment variable, set Environment = "PORT=5173 13:19:31
@lily:lily.flowersLily Foster * If you are trying to set an environment variable, set Environment = "PORT=5173" 13:19:33
@lily:lily.flowersLily Foster * PORT=5173 is not a command 13:19:51
@lily:lily.flowersLily Fostersystemd doesn't run this stuff through bash13:20:00
@peter-lustig:matrix.orgpeter-lustig
In reply to @lily:lily.flowers
PORT=5173 is not a command

it is just a command line

from the docs:

PORT, HOST and SOCKET_PATHpermalink
By default, the server will accept connections on 0.0.0.0 using port 3000. These can be customised with the PORT and HOST environment variables:

HOST=127.0.0.1 PORT=4000 node build
Alternatively, the server can be configured to accept connections on a specified socket path. When this is done using the SOCKET_PATH environment variable, the HOST and PORT environment variables will be disregarded.

SOCKET_PATH=/tmp/socket node build

13:20:16
@peter-lustig:matrix.orgpeter-lustig
In reply to @lily:lily.flowers
PORT=5173 is not a command
*

it is just a command line argument

from the docs:

PORT, HOST and SOCKET_PATHpermalink
By default, the server will accept connections on 0.0.0.0 using port 3000. These can be customised with the PORT and HOST environment variables:

HOST=127.0.0.1 PORT=4000 node build
Alternatively, the server can be configured to accept connections on a specified socket path. When this is done using the SOCKET_PATH environment variable, the HOST and PORT environment variables will be disregarded.

SOCKET_PATH=/tmp/socket node build

13:20:21
@lily:lily.flowersLily FosterIt's a bash-ism, not a command line argument13:20:41
@peter-lustig:matrix.orgpeter-lustigokay, I will try the environment13:20:51
@lily:lily.flowersLily FosterIf you are intending it to be an environment variable like bash does, you need to set it as an environment variable13:20:55

Show newer messages


Back to Room ListRoom Version: 6