// do NOT use ES6 module export syntax here module.exports = { paths: { build: '.build', dist: 'dist', }, // default directory and file perms dirmode: '0750', filemode: '0640', // gulp.src(source).pipe(gulp.dest(dest)) // dest is a path relative to BUILD_INSTALL_PATH // source globs are relative to the project root files: [ { dest: '', source: [ '.env.default', 'deploy/resources/artisan', 'deploy/resources/generate-docker-compose', 'deploy/resources/start', 'stop', ], }, { dest: 'src', source: [ 'src/**', '!src/bootstrap/cache', '!src/bootstrap/cache/**', '!src/composer*', '!src/phpunit*', '!src/storage', '!src/storage/**', '!src/tests', '!src/tests/**', ], }, ], // ad-hoc perms that are assigned right before the package archive is created chmods: [ ['0700', 'artisan'], ['0600', '.env.default'], ['0700', 'generate-docker-compose'], ['0750', 'src/artisan'], ['0700', 'start'], ['0700', 'stop'], ], // "debian", "rpm", "tarball", or "zipball" packaging: { type: 'debian', options: { scripts: { postinst: (prefix) => { return [ '#!/usr/bin/env bash', 'set -x', 'initctl reload-configuration', `cd ${prefix}`, './start', ]; }, }, compression: { algo: 'bzip2', level: '9', }, }, }, // "upstart" or "systemd" init: { type: 'systemd', etc: '/etc/systemd/system', scripts: { start: (prefix) => [`${prefix}/start`], stop: (prefix) => [`${prefix}/stop`], }, }, logrotate: { etc: '/etc/logrotate.d', stanzas: [ { path: '.runtime/var/log/nginx/*.log', directives: [ 'daily', 'missingok', 'copytruncate', 'compress', 'notifempty', 'create 640 root www-data', ], }, { path: 'src/storage/logs/*.log', directives: [ 'daily', 'missingok', 'copytruncate', 'compress', 'notifempty', 'create 640 root www-data', ], }, ], }, }; // vim: syntax=javascript ts=2 sts=2 sw=2 et