forked from axeman/erpnext-nix
Add script to run erpnext
This commit is contained in:
parent
b786806143
commit
f1b7a7a5b9
|
@ -26,6 +26,13 @@
|
||||||
#newversion = python3.pkgs.newversion.overrideAttrs(old: {
|
#newversion = python3.pkgs.newversion.overrideAttrs(old: {
|
||||||
# propagatedBuildInputs = old.propagatedBuildInputs ++ [python3.pkgs.setuptools];
|
# propagatedBuildInputs = old.propagatedBuildInputs ++ [python3.pkgs.setuptools];
|
||||||
#});
|
#});
|
||||||
|
penv = py.buildEnv.override {
|
||||||
|
extraLibs = [ py.pkgs.frappe py.pkgs.erpnext ];
|
||||||
|
};
|
||||||
|
runErpNext = pkgs.writeShellScriptBin "runErpNext" ''
|
||||||
|
export PYTHON_PATH=${penv}/${py.sitePackages}
|
||||||
|
${penv}/bin/gunicorn --bind=0.0.0.0:9090 --threads=4 --workers=2 --worker-class=gthread --worker-tmp-dir=/dev/shm --timeout=120 --preload frappe.app:application
|
||||||
|
'';
|
||||||
in rec {
|
in rec {
|
||||||
packages = {
|
packages = {
|
||||||
devEnv = pkgs.buildEnv {
|
devEnv = pkgs.buildEnv {
|
||||||
|
@ -34,7 +41,7 @@
|
||||||
pkgs.dasel
|
pkgs.dasel
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
inherit pkgs;
|
inherit pkgs runErpNext;
|
||||||
pip2nix = import "${pip2nix}/default.nix" { inherit pkgs; pythonPackages = "python310Packages"; };
|
pip2nix = import "${pip2nix}/default.nix" { inherit pkgs; pythonPackages = "python310Packages"; };
|
||||||
erpnext = py.pkgs.erpnext;
|
erpnext = py.pkgs.erpnext;
|
||||||
pythonPkgs = py.pkgs;
|
pythonPkgs = py.pkgs;
|
||||||
|
|
Loading…
Reference in a new issue