Remove unnecessary Docker volumes.

This commit is contained in:
Buster "Silver Eagle" Neece 2022-03-12 22:33:57 -06:00
parent ef4c438857
commit 9e7aae3a8b
No known key found for this signature in database
GPG Key ID: 9FC8B9E008872109
5 changed files with 15 additions and 14 deletions

View File

@ -77,7 +77,7 @@ COPY --chown=azuracast:azuracast . .
RUN composer dump-autoload --optimize --classmap-authoritative \
&& touch /var/azuracast/.docker
VOLUME ["/var/azuracast/stations", "/var/azuracast/www_tmp", "/var/azuracast/uploads", "/var/azuracast/backups", "/var/azuracast/sftpgo/persist", "/var/azuracast/servers/shoutcast2"]
VOLUME ["/var/azuracast/stations", "/var/azuracast/uploads", "/var/azuracast/backups", "/var/azuracast/sftpgo/persist", "/var/azuracast/servers/shoutcast2"]
ENV PATH="${PATH}:/var/azuracast/servers/shoutcast2"
#

View File

@ -185,9 +185,7 @@ services:
volumes:
- letsencrypt:/etc/nginx/certs
- letsencrypt_acme:/etc/acme.sh
- www_vendor:/var/azuracast/www/vendor
- www_uploads:/var/azuracast/uploads
- tmp_data:/var/azuracast/www_tmp
- station_data:/var/azuracast/stations
- shoutcast2_install:/var/azuracast/servers/shoutcast2
- geolite_install:/var/azuracast/geoip
@ -212,7 +210,5 @@ volumes:
geolite_install: { }
sftpgo_data: { }
station_data: { }
www_vendor: { }
www_uploads: { }
tmp_data: { }
backups: { }

View File

@ -429,9 +429,6 @@ install() {
docker-compose pull
docker volume rm azuracast_www_vendor 2>/dev/null || true
docker volume rm azuracast_tmp_data 2>/dev/null || true
docker-compose run --rm web -- azuracast_install "$@"
docker-compose up -d
exit
@ -551,9 +548,6 @@ update() {
docker-compose down
fi
docker volume rm azuracast_www_vendor
docker volume rm azuracast_tmp_data
docker-compose run --rm web -- azuracast_update "$@"
docker-compose up -d

View File

@ -257,6 +257,11 @@ class InstallCommand extends Command
$env['LETSENCRYPT_EMAIL'] ?? ''
);
}
$azuracastEnv['COMPOSER_PLUGIN_MODE'] = $io->confirm(
$azuracastEnvConfig['COMPOSER_PLUGIN_MODE']['name'],
$azuracastEnv->getAsBool('COMPOSER_PLUGIN_MODE', false)
);
}
$io->writeln(
@ -351,6 +356,12 @@ class InstallCommand extends Command
}
}
// Add plugin mode if it's selected.
if ($isStandalone && $azuracastEnv->getAsBool('COMPOSER_PLUGIN_MODE', false)) {
$yaml['services']['web']['volumes'][] = 'www_vendor:/var/azuracast/www/vendor';
$yaml['volumes']['www_vendor'] = [];
}
// Remove Redis if it's not enabled.
if (!$isStandalone) {
$enableRedis = $azuracastEnv->getAsBool(Environment::ENABLE_REDIS, true);

View File

@ -65,12 +65,12 @@ class AzuraCastEnvFile extends AbstractEnvFile
],
],
'COMPOSER_PLUGIN_MODE' => [
'name' => __('Composer Plugin Mode'),
'name' => __('Enable Custom Code Plugins'),
'description' => __(
'Enable the composer "merge" functionality to combine the main application\'s composer.json file with any plugin composer files. This can have performance implications, so you should only use it if you use one or more plugins with their own Composer dependencies.',
),
'options' => [true, false],
'default' => false,
'options' => [true, false],
'default' => false,
],
Environment::AUTO_ASSIGN_PORT_MIN => [
'name' => __(