add wings
This commit is contained in:
parent
5d8c281c7f
commit
c88b244506
1 changed files with 46 additions and 1 deletions
|
|
@ -1,8 +1,25 @@
|
||||||
{
|
{
|
||||||
pkgs,
|
pkgs,
|
||||||
config,
|
config,
|
||||||
|
lib,
|
||||||
...
|
...
|
||||||
}: {
|
}: let
|
||||||
|
wings = pkgs.stdenv.mkDerivation {
|
||||||
|
name = "wings";
|
||||||
|
|
||||||
|
src = pkgs.fetchurl {
|
||||||
|
name = "wings";
|
||||||
|
url = "https://github.com/pterodactyl/wings/releases/latest/download/wings_linux_amd64";
|
||||||
|
sha256 = lib.fakeSha256;
|
||||||
|
};
|
||||||
|
|
||||||
|
phases = ["installPhase"];
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
install -D $src $out/bin/wings
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
in {
|
||||||
services.mysql = {
|
services.mysql = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = pkgs.mariadb;
|
package = pkgs.mariadb;
|
||||||
|
|
@ -27,6 +44,26 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
systemd.services."wings" = {
|
||||||
|
after = ["docker.service"];
|
||||||
|
requires = ["docker.service"];
|
||||||
|
partOf = ["docker.service"];
|
||||||
|
script = ''
|
||||||
|
${wings}/bin/wings
|
||||||
|
'';
|
||||||
|
wantedBy = ["multi-user.target"];
|
||||||
|
serviceConfig = {
|
||||||
|
User = "root";
|
||||||
|
WorkingDirectory = "/etc/pterodactyl";
|
||||||
|
LimitNOFILE = 4096;
|
||||||
|
PIDFile = /var/run/wings/daemon.pid;
|
||||||
|
Restart = "on-failure";
|
||||||
|
StartLimitInterval = 180;
|
||||||
|
StartLimitBurst = 30;
|
||||||
|
RestartSec = "5s";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
systemd.services."p_queue-worker" = {
|
systemd.services."p_queue-worker" = {
|
||||||
after = ["redis.service"];
|
after = ["redis.service"];
|
||||||
wantedBy = ["multi-user.target"];
|
wantedBy = ["multi-user.target"];
|
||||||
|
|
@ -71,6 +108,14 @@
|
||||||
fastcgi_connect_timeout 300;
|
fastcgi_connect_timeout 300;
|
||||||
fastcgi_send_timeout 300;
|
fastcgi_send_timeout 300;
|
||||||
fastcgi_read_timeout 300;
|
fastcgi_read_timeout 300;
|
||||||
|
|
||||||
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
|
proxy_set_header Host $host;
|
||||||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
proxy_set_header X-Forwarded-Proto $scheme;
|
||||||
|
proxy_redirect off;
|
||||||
|
proxy_buffering off;
|
||||||
|
proxy_request_buffering off;
|
||||||
'';
|
'';
|
||||||
|
|
||||||
locations."~ /\\.ht".extraConfig = ''
|
locations."~ /\\.ht".extraConfig = ''
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue