blob: b1ccb980ab8b0d1b4382f5fb9e5231d2ba3aa205 (
plain) (
tree)
|
|
{ environment ? "prod"
, varDir ? "/var/lib/tellesflorian_${environment}"
, composerEnv, fetchurl, mylibs }:
let
app = composerEnv.buildPackage (
import ./php-packages.nix { inherit composerEnv fetchurl; } //
mylibs.fetchedGitPrivate ./tellesflorian.json //
rec {
noDev = (environment == "prod");
preInstall = ''
export SYMFONY_ENV="${environment}"
'';
postInstall = ''
cd $out
rm app/config/parameters.yml
ln -sf /var/secrets/webapps/${environment}-tellesflorian app/config/parameters.yml
rm -rf var/{logs,cache}
ln -sf ${varDir}/var/{logs,cache,sessions} var/
'';
passthru = {
inherit varDir environment;
webRoot = "${app}/web";
};
});
in app
|