]>
Commit | Line | Data |
---|---|---|
313d19ce IB |
1 | { environment ? "prod" |
2 | , varDir ? "/var/lib/piedsjaloux_${environment}" | |
d3452fc5 | 3 | , secretsPath ? "/var/secrets/webapps/${environment}-piedsjaloux" |
db343436 | 4 | , composerEnv, fetchurl, fetchgit, sources }: |
313d19ce IB |
5 | let |
6 | app = composerEnv.buildPackage ( | |
7 | import ./php-packages.nix { inherit composerEnv fetchurl fetchgit; } // | |
313d19ce | 8 | rec { |
db343436 IB |
9 | version = sources.websites-piedsjaloux-app.version; |
10 | pname = "piedsjaloux"; | |
11 | name = "${pname}-${version}"; | |
12 | src = sources.websites-piedsjaloux-app; | |
313d19ce IB |
13 | noDev = (environment == "prod"); |
14 | preInstall = '' | |
15 | export SYMFONY_ENV="${environment}" | |
16 | ''; | |
17 | # /!\ miniatures and data need to be in the same physical dir due to a | |
18 | # bug in leapt.im (searches for data/../miniatures) | |
19 | postInstall = '' | |
20 | cd $out | |
21 | rm app/config/parameters.yml | |
d3452fc5 | 22 | ln -sf ${secretsPath} app/config/parameters.yml |
313d19ce IB |
23 | rm -rf var/{logs,cache,data,miniatures,tmp} |
24 | ln -sf ${varDir}/{logs,cache,data,miniatures,tmp} var/ | |
25 | ''; | |
26 | passthru = { | |
d3452fc5 | 27 | inherit varDir environment secretsPath; |
313d19ce IB |
28 | webRoot = "${app}/web"; |
29 | }; | |
30 | }); | |
31 | in app |