everything works now!

This commit is contained in:
Michael Becker 2025-01-13 00:13:30 -05:00
parent 0c8962cdfb
commit 56bdfcf4a5
10 changed files with 65 additions and 7 deletions

2
.gitignore vendored
View File

@ -18,3 +18,5 @@ machines/
*.bak *.bak
*.swp *.swp
# ignore the mocha-dotnet oms build dir
mocha-suv/docker/fs/usr/lib/mocha/oms

3
.gitmodules vendored
View File

@ -7,3 +7,6 @@
[submodule "mocha-common"] [submodule "mocha-common"]
path = mocha-common path = mocha-common
url = git@gitea.azcona-becker.net:mochapowered/mocha-common url = git@gitea.azcona-becker.net:mochapowered/mocha-common
[submodule "mocha-dotnet"]
path = mocha-dotnet
url = git@gitea.azcona-becker.net:mochapowered/mocha-dotnet

View File

@ -1,5 +1,22 @@
#!/bin/bash #!/bin/bash
# update .NET
pushd ../mocha-dotnet/mocha-dotnet/src/app/Mocha.Oms.Server
dotnet build
popd
# build the libraries
pushd mocha-common/mocha-common
./build
popd
mkdir -p ./mocha-suv/docker/fs/usr/lib/mocha/oms
cp -r ../mocha-dotnet/mocha-dotnet/src/app/Mocha.Oms.Server/bin/Debug/net8.0/* ./mocha-suv/docker/fs/usr/lib/mocha/oms
mkdir -p ./mocha-suv/docker/fs/usr/share/mocha/system
cp mocha-common/mocha-common/output/net.alcetech.Mocha.System.mcl ./mocha-suv/docker/fs/usr/share/mocha/system
cp mocha-common/mocha-common/output/net.alcetech.Mocha.Web.mcl ./mocha-suv/docker/fs/usr/share/mocha/system
# build the image (i.e. 'mocha suv init' ) # build the image (i.e. 'mocha suv init' )
docker build -t mocha-httpd -f mocha-suv/docker/Dockerfile . docker build -t mocha-httpd -f mocha-suv/docker/Dockerfile .

@ -1 +1 @@
Subproject commit 5a4d4aa243bc02348eb717496739c696268a3a1e Subproject commit 0c9db452e4933c07337aee94b05f29f08e5a4bb4

@ -1 +1 @@
Subproject commit 162cbff537903be8f76b0da5939606ebe1763c8b Subproject commit 0375e3977a54c557417b307454e1074a0b0f3807

View File

@ -1,13 +1,16 @@
# FROM httpd # FROM httpd
FROM ubuntu FROM ubuntu
RUN apt update && apt upgrade -y && apt install -y php php-mbstring php-curl php-xml pwgen RUN apt update && apt upgrade -y && apt install -y php php-mbstring php-curl php-xml pwgen dotnet-runtime-8.0
# RUN rm /usr/local/apache2/htdocs/index.html # RUN rm /usr/local/apache2/htdocs/index.html
RUN rm /var/www/html/index.html RUN rm /var/www/html/index.html && a2enmod ssl && a2enmod rewrite && service apache2 restart
RUN a2enmod ssl && a2enmod rewrite RUN mkdir /usr/lib/mocha && mkdir /etc/mocha && mkdir /var/mocha
RUN service apache2 restart
# install the root file system overlay
COPY mocha-suv/docker/fs /
COPY mocha-common/mocha-common/data/uploads /var/mocha/uploads
# COPY mocha-php/mocha-php/src/mocha-php /usr/local/apache2/htdocs/ # COPY mocha-php/mocha-php/src/mocha-php /usr/local/apache2/htdocs/
COPY mocha-php/mocha-php/src/mocha-php /var/www/html COPY mocha-php/mocha-php/src/mocha-php /var/www/html
@ -25,5 +28,6 @@ COPY mocha-suv/docker/ports.conf /etc/apache2/ports.conf
COPY mocha-suv/docker/site.conf /etc/apache2/sites-available/000-default.conf COPY mocha-suv/docker/site.conf /etc/apache2/sites-available/000-default.conf
EXPOSE 443 EXPOSE 443
CMD [ "apache2ctl", "-D", "FOREGROUND" ]
CMD [ "mochactl", "start" ]

View File

@ -0,0 +1,18 @@
[Unit]
Description=The Mocha OMS Server
After=network.target remote-fs.target nss-lookup.target
Documentation=https://support.mochapowered.com/oms-dotnet/1.3/
[Service]
Type=forking
Environment=MOCHAOMS_STARTED_BY_SYSTEMD=true
ExecStart=/usr/sbin/mochactl start-oms
ExecStop=/usr/sbin/mochactl stop-oms
ExecReload=/usr/sbin/mochactl reload-oms
KillMode=mixed
PrivateTmp=true
Restart=on-abort
OOMPolicy=continue
[Install]
WantedBy=multi-user.target

View File

@ -0,0 +1,14 @@
#!/bin/bash
EXECPATH="/usr/lib/mocha/oms"
EXECFILE="Mocha.Oms.Server"
case "$1" in
"start-oms")
exec $EXECPATH/$EXECFILE &
;;
"start")
exec $EXECPATH/$EXECFILE &
apache2ctl -D FOREGROUND
;;
esac