Include static web files, read config from /etc in Bookwyrm package
This commit is contained in:
parent
54dfdc52dc
commit
d4b21b6749
1 changed files with 10 additions and 4 deletions
|
@ -129,6 +129,7 @@ mkDerivation {
|
||||||
|
|
||||||
mkdir -p $out/bin
|
mkdir -p $out/bin
|
||||||
mkdir -p $out/lib/python3.11/site-packages
|
mkdir -p $out/lib/python3.11/site-packages
|
||||||
|
mkdir -p $out/srv/http/bookwyrm
|
||||||
mkdir -p $out/var/lib/bookwyrm
|
mkdir -p $out/var/lib/bookwyrm
|
||||||
|
|
||||||
# Python dependencies
|
# Python dependencies
|
||||||
|
@ -146,6 +147,10 @@ mkDerivation {
|
||||||
|
|
||||||
cp $src/manage.py $out/lib/python3.11/
|
cp $src/manage.py $out/lib/python3.11/
|
||||||
|
|
||||||
|
# Static web files
|
||||||
|
|
||||||
|
cp -r /build/source/static $out/srv/http/bookwyrm/
|
||||||
|
|
||||||
# Executables
|
# Executables
|
||||||
|
|
||||||
cat <<- EOF > $out/bin/bookwyrm
|
cat <<- EOF > $out/bin/bookwyrm
|
||||||
|
@ -164,18 +169,19 @@ mkDerivation {
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
export PYTHONPATH="$out/lib/python3.11/site-packages"
|
export PYTHONPATH=$out/lib/python3.11/site-packages
|
||||||
|
|
||||||
export DEBUG="false"
|
export DEBUG=false
|
||||||
|
|
||||||
|
export DOMAIN="\$( cat /etc/bookwyrm/domain )"
|
||||||
|
|
||||||
export DOMAIN=""
|
|
||||||
export EMAIL=""
|
export EMAIL=""
|
||||||
export EMAIL_HOST=""
|
export EMAIL_HOST=""
|
||||||
export EMAIL_HOST_USER=""
|
export EMAIL_HOST_USER=""
|
||||||
export EMAIL_HOST_PASSWORD=""
|
export EMAIL_HOST_PASSWORD=""
|
||||||
|
|
||||||
# The escape here is required in order to retrieve the key file contents at runtime
|
# The escape here is required in order to retrieve the key file contents at runtime
|
||||||
export SECRET_KEY="\$( cat /etc/nixos/assets/bookwyrm-secret-key )"
|
export SECRET_KEY="\$( cat /etc/bookwyrm/secret-key )"
|
||||||
|
|
||||||
exec \$@
|
exec \$@
|
||||||
EOF
|
EOF
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue