1
Fork 0

e11sync: add an optional 'database-path'

will be useful during deployment.
This commit is contained in:
Motiejus Jakštys 2024-01-14 23:23:39 +02:00
parent 0f16146e63
commit a950f87178
1 changed files with 5 additions and 0 deletions

View File

@ -1,5 +1,6 @@
{ {
self, self,
lib,
stdenv, stdenv,
runCommand, runCommand,
makeWrapper, makeWrapper,
@ -8,6 +9,7 @@
libmaxminddb, libmaxminddb,
dart-sass, dart-sass,
gunicornPort ? 8001, gunicornPort ? 8001,
database-path ? null,
geoip-archive, geoip-archive,
}: }:
stdenv.mkDerivation { stdenv.mkDerivation {
@ -27,6 +29,9 @@ stdenv.mkDerivation {
makeWrapper ${python3Packages.gunicorn}/bin/gunicorn $out/bin/e11sync-gunicorn \ makeWrapper ${python3Packages.gunicorn}/bin/gunicorn $out/bin/e11sync-gunicorn \
--chdir $out/app \ --chdir $out/app \
--set-default E11SYNC_HTTP_PORT ${toString gunicornPort} \ --set-default E11SYNC_HTTP_PORT ${toString gunicornPort} \
${lib.optionalString (database-path != null) ''
--set E11SYNC_DATABASE_PATH "${database-path}" \
''} \
--set E11SYNC_DEBUG "" \ --set E11SYNC_DEBUG "" \
--set E11SYNC_COMPRESS_OFFLINE 1 \ --set E11SYNC_COMPRESS_OFFLINE 1 \
--set GEOIP_PATH "${geoip-archive}" \ --set GEOIP_PATH "${geoip-archive}" \