Well I don’t know what your index.php looks like, but if they both look something like this:
<?php
use Slim\App;
require_once '../vendor/autoload.php';
$app = new App();
$app->get('/', Your\Apps\IndexAction::class);
$app->get('/foo', Your\Apps\FooAction::class);
$app->run();
Then you just define different routes. We have ours in different files which we include, but the basic idea is the same. The core app is the same thing, but we can use different routes and actions so that the two appear to be different apps, even though it’s the same code base. You may have different dependency resolution, I don’t know… but it’s quite possible, and it’s not terribly difficult.
I can see that you’re using Docker Compose, too. We also do this, and we have one container build that maps the public directory to one app’s index.php, and the other container maps to the other.
Incidentally, now I’m on a larger screen, I notice that you have an index.php in the root of the project. You really ought to have it in a subdirectory so that it’s not possible for someone to request sensitive files. If I were to go to /composer.json on your second app I’d be able to view the contents of the file, for example. You don’t want to do that