2 , varDir ? "/var/lib/piedsjaloux_${environment}"
3 , secretsPath ? "/var/secrets/webapps/${environment}-piedsjaloux"
4 , composerEnv, fetchurl, fetchgit, sources }:
6 app = composerEnv.buildPackage (
7 import ./php-packages.nix { inherit composerEnv fetchurl fetchgit; } //
9 version = sources.websites-piedsjaloux-app.version;
10 pname = "piedsjaloux";
11 name = "${pname}-${version}";
12 src = sources.websites-piedsjaloux-app;
13 noDev = (environment == "prod");
15 export SYMFONY_ENV="${environment}"
17 # /!\ miniatures and data need to be in the same physical dir due to a
18 # bug in leapt.im (searches for data/../miniatures)
21 rm app/config/parameters.yml
22 ln -sf ${secretsPath} app/config/parameters.yml
23 rm -rf var/{logs,cache,data,miniatures,tmp}
24 ln -sf ${varDir}/{logs,cache,data,miniatures,tmp} var/
27 inherit varDir environment secretsPath;
28 webRoot = "${app}/web";