Remove priv'ed components from default sample file.
This commit is contained in:
parent
079d4dcabf
commit
aa6d7bbd1e
4
Makefile
4
Makefile
|
@ -3,9 +3,9 @@
|
|||
list:
|
||||
@LC_ALL=C $(MAKE) -pRrq -f $(lastword $(MAKEFILE_LIST)) : 2>/dev/null | awk -v RS= -F: '/^# File/,/^# Finished Make data base/ {if ($$1 !~ "^[#.]") {print $$1}}' | sort | egrep -v -e '^[^[:alnum:]]' -e '^$@$$'
|
||||
|
||||
install-gitpod:
|
||||
install-cloud-ide:
|
||||
cp docker-compose.sample.yml docker-compose.yml
|
||||
cp docker-compose.gitpod.yml docker-compose.override.yml
|
||||
cp docker-compose.cloudide.yml docker-compose.override.yml
|
||||
cp dev.env .env
|
||||
cp azuracast.dev.env azuracast.env
|
||||
|
||||
|
|
|
@ -83,10 +83,6 @@ services :
|
|||
- frontend
|
||||
- backend
|
||||
restart : always
|
||||
ulimits : &default-ulimits
|
||||
nofile :
|
||||
soft : 65536
|
||||
hard : 65536
|
||||
logging : &default-logging
|
||||
options :
|
||||
max-size : "1m"
|
||||
|
@ -106,8 +102,6 @@ services :
|
|||
redis :
|
||||
container_name : azuracast_redis
|
||||
image : "ghcr.io/azuracast/redis:${AZURACAST_VERSION:-latest}"
|
||||
sysctls :
|
||||
net.core.somaxconn : 1024
|
||||
volumes :
|
||||
- redis_data:/data
|
||||
networks :
|
||||
|
@ -283,7 +277,6 @@ services :
|
|||
- backend
|
||||
init : true
|
||||
restart : always
|
||||
ulimits : *default-ulimits
|
||||
logging : *default-logging
|
||||
|
||||
networks :
|
||||
|
|
|
@ -333,14 +333,20 @@ class InstallCommand
|
|||
|
||||
// Remove privileged-mode settings if not enabled.
|
||||
$enablePrivileged = $env->getAsBool('AZURACAST_COMPOSE_PRIVILEGED', true);
|
||||
if (!$enablePrivileged) {
|
||||
foreach ($yaml['services'] as &$service) {
|
||||
unset(
|
||||
$service['ulimits'],
|
||||
$service['sysctls']
|
||||
);
|
||||
}
|
||||
unset($service);
|
||||
if ($enablePrivileged) {
|
||||
$yaml['services']['redis']['sysctls'] = [
|
||||
'net.core.somaxconn' => 1024,
|
||||
];
|
||||
|
||||
$ulimits = [
|
||||
'nofile' => [
|
||||
'soft' => 65536,
|
||||
'hard' => 65536,
|
||||
],
|
||||
];
|
||||
|
||||
$yaml['services']['web']['ulimits'] = $ulimits;
|
||||
$yaml['services']['stations']['ulimits'] = $ulimits;
|
||||
}
|
||||
|
||||
$yamlRaw = Yaml::dump($yaml, PHP_INT_MAX);
|
||||
|
|
Loading…
Reference in New Issue