aboutsummaryrefslogtreecommitdiff
path: root/flake.nix
diff options
context:
space:
mode:
authorpacien2021-07-29 23:09:30 +0200
committerpacien2021-07-29 23:09:30 +0200
commit07a5b7d436d9be68a3c04e3584777e8ab6eac016 (patch)
treeb22a2be2e386c69dd9c28ac7f76d85a6df7fc2ed /flake.nix
parentd8ebf148dda8d5e7fae5906568aa01e98aa4cc23 (diff)
downloaduge_l2_rdbms_python_proto-07a5b7d436d9be68a3c04e3584777e8ab6eac016.tar.gz
flake: add app server package output
Diffstat (limited to 'flake.nix')
-rw-r--r--flake.nix10
1 files changed, 10 insertions, 0 deletions
diff --git a/flake.nix b/flake.nix
index 4e10a12..b8616f8 100644
--- a/flake.nix
+++ b/flake.nix
@@ -92,6 +92,16 @@
92 92
93 in { 93 in {
94 94
95 packages = {
96 # Minimal production server.
97 # This includes only application files tracked by git.
98 # Using `gunicorn` on top of `uvicorn` is recommended for bigger loads.
99 server = writeShellScript "server" ''
100 cd ${./.}
101 ${pythonWithDependencies}/bin/uvicorn --app-dir app app:main "$@"
102 '';
103 };
104
95 devShell = mkShell rec { 105 devShell = mkShell rec {
96 buildInputs = [ pythonWithDependencies ] ++ develPackagesAndScripts; 106 buildInputs = [ pythonWithDependencies ] ++ develPackagesAndScripts;
97 107