94 lines
3.2 KiB
YAML
94 lines
3.2 KiB
YAML
# docker-compose for Mocha
|
|
# Copyright (C) 2025 Michael Becker <alcexhim@gmail.com>
|
|
|
|
# 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 <https://www.gnu.org/licenses/>.
|
|
|
|
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:
|
|
build:
|
|
context: ..
|
|
image: mcr.microsoft.com/dotnet/runtime:8.0
|
|
command: dotnet /oms/Mocha.Oms.Server.dll
|
|
environment:
|
|
OMS_SERVERPORT: 3012 # default is 4436; make sure they match!
|
|
OMS_DATABASENAME: mochadb
|
|
OMS_USERNAME: mochadb
|
|
OMS_PASSWORD: '93X37B]@k(svLmFM'
|
|
ports:
|
|
- "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.
|
|
mocha-uis:
|
|
build:
|
|
context: ..
|
|
image: mochapowered/mochaui-tenant:latest
|
|
environment:
|
|
VIRTUAL_HOST: localhost
|
|
# OMS_TYPE: mysql
|
|
# OMS_SERVERNAME: db
|
|
# OMS_SERVERPORT: 3306
|
|
# OMS_DATABASENAME: mochadb
|
|
# OMS_USERNAME: mochadb
|
|
# OMS_PASSWORD: '93X37B]@k(svLmFM'
|
|
OMS_TYPE: api
|
|
OMS_SERVERNAME: mocha-oms
|
|
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
|
|
networks:
|
|
- app-tenant
|
|
volumes:
|
|
- ../mocha-php/mocha-php/src/mocha-php:/var/www/html
|
|
- ../mocha-php/phast/lib/phast/server:/usr/local/lib/php/lib/phast
|
|
- ../mocha-php/phast/lib/phast/client/scripts:/var/www/html/scripts/phast
|
|
- ../mocha-dotnet/mocha-common/mocha-common/data/uploads:/var/mocha/uploads
|
|
- ../uwt-web/src/uwt-web/fonts/awesome/webfonts:/var/www/html/webfonts
|
|
|
|
static:
|
|
image: nginx:alpine
|
|
volumes:
|
|
- ../uwt-web/output:/usr/share/nginx/html
|
|
- ../uwt-web/src/uwt-web/fonts:/usr/share/nginx/html/fonts
|
|
networks:
|
|
- app-tenant
|
|
- app-manager
|
|
|
|
# nginx-proxy-tenant serves the main HTTP(S) site which forwards to the mochaui-tenant
|
|
nginx-proxy-tenant:
|
|
depends_on:
|
|
- static
|
|
- mocha-oms
|
|
image: jwilder/nginx-proxy
|
|
networks:
|
|
- app-tenant
|
|
- proxy
|
|
ports:
|
|
- "3333:80"
|
|
volumes:
|
|
- /var/run/docker.sock:/tmp/docker.sock:ro
|
|
- ../vhost-tenant.d:/etc/nginx/vhost.d:ro
|
|
|
|
networks:
|
|
proxy:
|
|
app-tenant:
|
|
app-manager:
|
|
|