database_user: ${config.mysql.user}
database_password: ${config.mysql.password}
database_server_version: ${pkgs.mariadb.mysqlVersion}
- mailer_transport: smtp
- mailer_host: mail.immae.eu
+ mailer_transport: sendmail
+ mailer_host: null
mailer_user: null
mailer_password: null
subscription_email: ${config.email}
allow_robots: true
secret: ${config.secret}
+ ${if environment == "prod" then ''
+ services:
+ swiftmailer.mailer.default.transport:
+ class: Swift_SendmailTransport
+ arguments: ['/run/wrappers/bin/sendmail -bs']
+ '' else ""}
'';
phpFpm = rec {
socket = "/var/run/phpfpm/connexionswing-${environment}.sock";
php_admin_value[upload_max_filesize] = 20M
php_admin_value[post_max_size] = 20M
;php_admin_flag[log_errors] = on
- php_admin_value[open_basedir] = "${configRoot}:${webappDir}:${varDir}:/tmp"
+ php_admin_value[open_basedir] = "/run/wrappers/bin/sendmail:${configRoot}:${webappDir}:${varDir}:/tmp"
php_admin_value[session.save_path] = "${varDir}/phpSessions"
${if environment == "dev" then ''
pm = ondemand
pm.max_spare_servers = 3
''}'';
};
- apache = {
+ apache = rec {
user = "wwwrun";
group = "wwwrun";
modules = [ "proxy_fcgi" ];
+ webappName = "connexionswing_${environment}";
+ root = "/run/current-system/webapps/${webappName}";
vhostConf = ''
<FilesMatch "\.php$">
SetHandler "proxy:unix:${phpFpm.socket}|fcgi://localhost"
ErrorDocument 401 "<html><meta http-equiv=\"refresh\" content=\"0;url=https://connexionswing.com\"></html>"
</Location>
- <Directory ${webRoot}>
+ <Directory ${root}>
Options Indexes FollowSymLinks MultiViews Includes
AllowOverride None
Require all granted
'' else ''
Use Stats connexionswing.com
- <Directory ${webRoot}>
+ <Directory ${root}>
Options Indexes FollowSymLinks MultiViews Includes
AllowOverride All
Require all granted
rm app/config/parameters.yml
ln -sf ${configRoot} app/config/parameters.yml
rm -rf var/{logs,cache}
- ln -sf ../../../../../../${varDir}/var/{logs,cache} var/
- ln -sf ../../../../../${varDir}/{medias,uploads} web/images/
+ ln -sf ${varDir}/var/{logs,cache} var/
+ ln -sf ${varDir}/{medias,uploads} web/images/
'';
});
webRoot = "${webappDir}/web";