From 4de811ae4ade0e40383d9b81e127d3d4ce961f17 Mon Sep 17 00:00:00 2001 From: Michael Becker Date: Wed, 30 Jul 2025 13:59:23 -0400 Subject: [PATCH] update mocha-dotnet and add Taskfile.yml support --- Taskfile.yml | 24 ++++++++++++++++++++++++ docker-compose.yml | 37 ++++++++++++++++++++++--------------- mocha-dotnet | 2 +- 3 files changed, 47 insertions(+), 16 deletions(-) create mode 100644 Taskfile.yml diff --git a/Taskfile.yml b/Taskfile.yml new file mode 100644 index 0000000..b8302c5 --- /dev/null +++ b/Taskfile.yml @@ -0,0 +1,24 @@ +version: '3' + +tasks: + build: + desc: Build all source files + cmds: + - ninja + + start: + desc: Bring up all Docker containers + dir: '{{.USER_WORKING_DIR}}' + preconditions: + - test -f docker-compose.yml + cmds: + - docker compose up -d + + stop: + desc: Bring down all Docker containers + dir: '{{.USER_WORKING_DIR}}' + preconditions: + - test -f docker-compose.yml + cmds: + - docker compose down + diff --git a/docker-compose.yml b/docker-compose.yml index ff9682a..c65c178 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,20 +1,38 @@ +# docker-compose for Mocha +# Copyright (C) 2025 Michael Becker + +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + services: + # mocha-oms runs the Object Management Service which loads MCL/MCX libraries and snapshots and provides an API to be consumed by mochaui-tenant. mocha-oms: image: mcr.microsoft.com/dotnet/runtime:8.0 command: dotnet /oms/Mocha.Oms.Server.dll environment: - OMS_SERVERPORT: 3012 + OMS_SERVERPORT: 3012 # default is 4436; make sure they match! OMS_DATABASENAME: mochadb OMS_USERNAME: mochadb OMS_PASSWORD: '93X37B]@k(svLmFM' ports: - - "14436:4436" + - "13012:3012" networks: - app-tenant volumes: - ./mocha-dotnet/mocha-dotnet/src/app/Mocha.Oms.Server/bin/Debug/net8.0:/oms - ./mocha-dotnet/mocha-common/mocha-common/output:/usr/share/mocha/system + # mochaui-tenant runs the PHP for the Mocha User Interface Service. it communicates with the OMS via API calls on the specified port. mochaui-tenant: build: context: . @@ -29,7 +47,7 @@ services: # OMS_PASSWORD: '93X37B]@k(svLmFM' OMS_TYPE: api OMS_SERVERNAME: mocha-oms - OMS_SERVERPORT: 4436 + OMS_SERVERPORT: 3012 # default is 4436; make sure they match! THEMES_PATH: /css/themes/{ThemeName}.css COMMON_THEMES_PATH: /css/common.css # # THEMES_PATH: /themes/{ThemeName}/theme.css @@ -51,18 +69,7 @@ services: - app-tenant - app-manager - #nginx-proxy-manager: - # depends_on: - # - static - # - mochaui-manager - # - phpmyadmin - # image: jwilder/nginx-proxy - # ports: - # - "8082:80" - # volumes: - # - /var/run/docker.sock:/tmp/docker.sock:ro - # - ./vhost-manager.d:/etc/nginx/vhost.d:ro - + # nginx-proxy-tenant serves the main HTTP(S) site which forwards to the mochaui-tenant nginx-proxy-tenant: depends_on: - static diff --git a/mocha-dotnet b/mocha-dotnet index f3dbdc8..4938eaa 160000 --- a/mocha-dotnet +++ b/mocha-dotnet @@ -1 +1 @@ -Subproject commit f3dbdc87b32124101c159ba35573bf49182619f5 +Subproject commit 4938eaaa445cd5c859316f11ca03b55bbe5f9da8