@@ -1,5 +1,10 @@
services:
+ db:
+ # Local only: publish MongoDB to host (optional, convenient for tools)
+ ports:
+ - "27017:27017"
+
app:
volumes:
- # Local mount: fixture NAS folder
+ # Local only: fixture NAS folder
- ./.local_nas:/mnt/niederlassungen:ro
@@ -8,8 +8,10 @@ services:
MONGO_INITDB_ROOT_PASSWORD: supersecret
- db_data:/data/db
- ports:
- - "27017:27017"
+ # Do not publish MongoDB to the host in the base/server compose.
+ # Containers can still reach it via the Compose network (service name: "db").
+ expose:
+ - "27017"
healthcheck:
test:
[