diff options
author | pacien | 2021-07-29 23:09:30 +0200 |
---|---|---|
committer | pacien | 2021-07-29 23:09:30 +0200 |
commit | 07a5b7d436d9be68a3c04e3584777e8ab6eac016 (patch) | |
tree | b22a2be2e386c69dd9c28ac7f76d85a6df7fc2ed /flake.nix | |
parent | d8ebf148dda8d5e7fae5906568aa01e98aa4cc23 (diff) | |
download | uge_l2_rdbms_python_proto-07a5b7d436d9be68a3c04e3584777e8ab6eac016.tar.gz |
flake: add app server package output
Diffstat (limited to 'flake.nix')
-rw-r--r-- | flake.nix | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -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 | ||