wip: it wants tables
This commit is contained in:
parent
b5365ffb3c
commit
e39cb5308f
19
flake.nix
19
flake.nix
|
@ -31,22 +31,25 @@
|
||||||
};
|
};
|
||||||
runErpNext = pkgs.writeShellScriptBin "runErpNext" ''
|
runErpNext = pkgs.writeShellScriptBin "runErpNext" ''
|
||||||
export PYTHON_PATH=${penv}/${py.sitePackages}
|
export PYTHON_PATH=${penv}/${py.sitePackages}
|
||||||
|
hostname=localhost
|
||||||
sites=$(mktemp -d)
|
sites=$(mktemp -d)
|
||||||
for f in ${assets}/share/sites/*; do
|
for f in ${assets}/share/sites/*; do
|
||||||
ln -s "$f" "$sites/$(basename $f)"
|
ln -s "$f" "$sites/$(basename $f)"
|
||||||
done
|
done
|
||||||
cat >$sites/common_site_config.json <<EOF
|
cat >$sites/common_site_config.json <<EOF
|
||||||
{
|
{
|
||||||
"db_host": "foo",
|
"db_host": "localhost",
|
||||||
"db_port": 1336,
|
"db_port": 3306,
|
||||||
"db_name": "foo" ,
|
"db_name": "erpnext" ,
|
||||||
"redis_cache": "foo",
|
"db_password": "erpnext" ,
|
||||||
"redis_queue": "foo",
|
"redis_cache": "redis://localhost",
|
||||||
"redis_socketio": "foo",
|
"redis_queue": "redis://localhost",
|
||||||
"socketio_port": 6732,
|
"redis_socketio": "redis://localhost",
|
||||||
"maintenance_mode": true
|
"socketio_port": 6379
|
||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
|
mkdir -p $sites/$hostname/logs
|
||||||
|
ln -s $sites/common_site_config.json $sites/$hostname/site_config.json
|
||||||
echo "Sites dir: $sites"
|
echo "Sites dir: $sites"
|
||||||
${penv}/bin/gunicorn --chdir="$sites" --bind=0.0.0.0:9090 --threads=4 --workers=2 --worker-class=gthread --worker-tmp-dir=/dev/shm --timeout=120 --preload frappe.app:application
|
${penv}/bin/gunicorn --chdir="$sites" --bind=0.0.0.0:9090 --threads=4 --workers=2 --worker-class=gthread --worker-tmp-dir=/dev/shm --timeout=120 --preload frappe.app:application
|
||||||
'';
|
'';
|
||||||
|
|
|
@ -48,7 +48,7 @@ let
|
||||||
yarnFlags = [ "--production" ];
|
yarnFlags = [ "--production" ];
|
||||||
|
|
||||||
offlineCache = fetchYarnDeps {
|
offlineCache = fetchYarnDeps {
|
||||||
yarnLock = "${erpnextSrc}/yarn.lock";
|
yarnLock = "${src}/yarn.lock";
|
||||||
hash = "sha256-PBdMUz9gJIoQaqQYbdk+xnd8CyZPmdeyz/9WznCb4Ss=";
|
hash = "sha256-PBdMUz9gJIoQaqQYbdk+xnd8CyZPmdeyz/9WznCb4Ss=";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue