diff options
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 | ||