everything works now!
This commit is contained in:
parent
0c8962cdfb
commit
56bdfcf4a5
2
.gitignore
vendored
2
.gitignore
vendored
@ -18,3 +18,5 @@ machines/
|
||||
*.bak
|
||||
*.swp
|
||||
|
||||
# ignore the mocha-dotnet oms build dir
|
||||
mocha-suv/docker/fs/usr/lib/mocha/oms
|
||||
|
||||
3
.gitmodules
vendored
3
.gitmodules
vendored
@ -7,3 +7,6 @@
|
||||
[submodule "mocha-common"]
|
||||
path = 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
|
||||
|
||||
17
docker-build
17
docker-build
@ -1,5 +1,22 @@
|
||||
#!/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' )
|
||||
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
|
||||
@ -1,13 +1,16 @@
|
||||
# FROM httpd
|
||||
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 /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 service apache2 restart
|
||||
RUN mkdir /usr/lib/mocha && mkdir /etc/mocha && mkdir /var/mocha
|
||||
|
||||
# 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 /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
|
||||
|
||||
EXPOSE 443
|
||||
CMD [ "apache2ctl", "-D", "FOREGROUND" ]
|
||||
|
||||
CMD [ "mochactl", "start" ]
|
||||
|
||||
|
||||
18
mocha-suv/docker/fs/usr/lib/systemd/system/mocha-oms.service
Normal file
18
mocha-suv/docker/fs/usr/lib/systemd/system/mocha-oms.service
Normal 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
|
||||
14
mocha-suv/docker/fs/usr/sbin/mochactl
Executable file
14
mocha-suv/docker/fs/usr/sbin/mochactl
Executable 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
|
||||
Binary file not shown.
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user