test
This commit is contained in:
parent
07573f4067
commit
9876606788
23
flake.nix
23
flake.nix
|
@ -20,7 +20,8 @@
|
||||||
];
|
];
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
packages.x86_64-linux.default = pkgs.python3Packages.buildPythonPackage rec {
|
|
||||||
|
packages.x86_64-linux.default = pkgs.python3Packages.buildPythonPackage rec {
|
||||||
pname = "ozai-webui";
|
pname = "ozai-webui";
|
||||||
version = "0.1.1";
|
version = "0.1.1";
|
||||||
#propagatedBuildInputs = deps;
|
#propagatedBuildInputs = deps;
|
||||||
|
@ -37,6 +38,7 @@
|
||||||
mkdir -p $out/lib/python3.11/site-packages/static
|
mkdir -p $out/lib/python3.11/site-packages/static
|
||||||
mkdir -p $out/lib/python3.11/templates
|
mkdir -p $out/lib/python3.11/templates
|
||||||
mkdir -p $out/lib/python3.11/static
|
mkdir -p $out/lib/python3.11/static
|
||||||
|
|
||||||
install -Dm444 ${src}/static/* $out/share/ozai_webui/static/
|
install -Dm444 ${src}/static/* $out/share/ozai_webui/static/
|
||||||
install -Dm444 ${src}/templates/* $out/share/ozai_webui/templates/
|
install -Dm444 ${src}/templates/* $out/share/ozai_webui/templates/
|
||||||
cp -r $src/templates $out/lib/python3.11/site-packages/ozai_webui/templates
|
cp -r $src/templates $out/lib/python3.11/site-packages/ozai_webui/templates
|
||||||
|
@ -122,18 +124,19 @@ packages.x86_64-linux.ozai-webui-run = pkgs.stdenv.mkDerivation rec {
|
||||||
description = "Ozai WebUI server";
|
description = "Ozai WebUI server";
|
||||||
after = [ "network.target" ];
|
after = [ "network.target" ];
|
||||||
wantedBy = [ "multi-user.target" ];
|
wantedBy = [ "multi-user.target" ];
|
||||||
environment = {
|
environment = {
|
||||||
OZAI_URL= "${config.services.ozai-webui.ozaiUrl}";
|
OZAI_URL= "${config.services.ozai-webui.ozaiUrl}";
|
||||||
OZAI_WEBUI_HOST= "${config.services.ozai-webui.host}";
|
OZAI_WEBUI_HOST= "${config.services.ozai-webui.host}";
|
||||||
OZAI_WEBUI_PORT= toString(config.services.ozai-webui.port);
|
OZAI_WEBUI_PORT= toString(config.services.ozai-webui.port);
|
||||||
OZAI_WEBUI_STATIC_FOLDER= "${self.packages.x86_64-linux.default}/share/ozai-webui/static";
|
OZAI_WEBUI_STATIC_FOLDER= "${self.packages.x86_64-linux.default}/share/ozai-webui/static";
|
||||||
OZAI_WEBUI_TEMPLATE_FOLDER="${self.packages.x86_64-linux.default}/share/ozai-webui/templates";
|
OZAI_WEBUI_TEMPLATE_FOLDER="${self.packages.x86_64-linux.default}/share/ozai-webui/templates";
|
||||||
};
|
};
|
||||||
|
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
#ExecStart = "${self.packages.x86_64-linux.ozai-webui-run}/bin/run ${config.services.ozai-webui.host} ${toString(config.services.ozai-webui.port)} ${self.packages.x86_64-linux.default}/bin";
|
#ExecStart = "${self.packages.x86_64-linux.ozai-webui-run}/bin/run ${config.services.ozai-webui.host} ${toString(config.services.ozai-webui.port)} ${self.packages.x86_64-linux.default}/bin";
|
||||||
ExecStart = "${self.packages.x86_64-linux.ozai-webui-run}/bin/run ${config.services.ozai-webui.host} ${toString(config.services.ozai-webui.port)} ${self.packages.x86_64-linux.default}/lib/python3.11/site-packages/";
|
# ExecStart = "${self.packages.x86_64-linux.ozai-webui-run}/bin/run ${config.services.ozai-webui.host} ${toString(config.services.ozai-webui.port)} ${self.packages.x86_64-linux.default}/lib/python3.11/site-packages/";
|
||||||
#ExecStart = "${self.packages.x86_64-linux.default}/bin/ozai_webui";
|
# ExecStart = "${self.packages.x86_64-linux.ozai-webui}/bin/ozai-webui";
|
||||||
|
ExecStart = "${self.packages.x86_64-linux.default}/bin/ozai_webui";
|
||||||
Restart = "always";
|
Restart = "always";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
2
result
2
result
|
@ -1 +1 @@
|
||||||
/nix/store/22y4lw54f6yp05f6h0876m4rwfk7hi0k-ozai-webui-run-0.1.1
|
/nix/store/v6rmds7152d3cg3h77kjsg1kfvmgz108-ozai-webui-run-0.1.1
|
1
result-1
1
result-1
|
@ -1 +0,0 @@
|
||||||
/nix/store/f0rv69ig250np27kqx6ag8sbyx5f05fy-python3.11-ozai-webui-0.1.1
|
|
|
@ -221,8 +221,9 @@ def ws_message(data):
|
||||||
socketio.emit('move_status', response.text, room=game_id)
|
socketio.emit('move_status', response.text, room=game_id)
|
||||||
|
|
||||||
def main ():
|
def main ():
|
||||||
return app.run(host=ozai_webui_host, port=ozai_webui_port)
|
# return app.run(host=ozai_webui_host, port=ozai_webui_port)
|
||||||
#return socketio.run(app, debug=False, host=ozai_webui_host, port=ozai_webui_port, allow_unsafe_werkzeug=True)
|
#return socketio.run(app, debug=False, host=ozai_webui_host, port=ozai_webui_port, allow_unsafe_werkzeug=True)
|
||||||
|
return socketio.run(app, debug=False, host=ozai_webui_host, port=ozai_webui_port)
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
main()
|
main()
|
||||||
|
|
Loading…
Reference in New Issue