@@ -2819,8 +2819,10 @@ function parseDockerComposeFile(Service|Application $resource, bool $isNew = fal
2819
2819
$ defaultLabels = defaultLabels ($ resource ->id , $ containerName , $ pull_request_id , type: 'application ' );
2820
2820
$ serviceLabels = $ serviceLabels ->merge ($ defaultLabels );
2821
2821
2822
- if ($ server ->isLogDrainEnabled () && $ resource ->isLogDrainEnabled ()) {
2823
- data_set ($ service , 'logging ' , generate_fluentd_configuration ());
2822
+ if ($ server ->isLogDrainEnabled ()) {
2823
+ if ($ resource instanceof Application && $ resource ->isLogDrainEnabled ()) {
2824
+ data_set ($ service , 'logging ' , generate_fluentd_configuration ());
2825
+ }
2824
2826
}
2825
2827
if ($ serviceLabels ->count () > 0 ) {
2826
2828
if ($ resource ->settings ->is_container_label_escape_enabled ) {
@@ -2923,8 +2925,10 @@ function newParser(Application|Service $resource, int $pull_request_id = 0, ?int
2923
2925
$ restart = data_get_str ($ service , 'restart ' , RESTART_MODE );
2924
2926
$ logging = data_get ($ service , 'logging ' );
2925
2927
2926
- if ($ server ->isLogDrainEnabled () && $ resource ->isLogDrainEnabled ()) {
2927
- $ logging = generate_fluentd_configuration ();
2928
+ if ($ server ->isLogDrainEnabled ()) {
2929
+ if ($ resource instanceof Application && $ resource ->isLogDrainEnabled ()) {
2930
+ $ logging = generate_fluentd_configuration ();
2931
+ }
2928
2932
}
2929
2933
$ volumes = collect (data_get ($ service , 'volumes ' , []));
2930
2934
$ networks = collect (data_get ($ service , 'networks ' , []));
0 commit comments