chore: integrate both web frontends to the Docker stuff

This commit is contained in:
Emmanuel BENOîT 2025-01-03 16:14:25 +01:00
parent 389304ed4d
commit 523b98f8a3
Signed by: Emmanuel BENOîT
SSH key fingerprint: SHA256:l7PFUUF5TCDsvYeQC9OnTNz08dFY7Fvf4Hv3neIqYpg
4 changed files with 44 additions and 2 deletions

View file

@ -20,3 +20,25 @@ COPY --from=build /src/legacyworlds-server/legacyworlds-server-main/target/lib /
ADD docker/backend-entrypoint.sh /app/entrypoint.sh
ENTRYPOINT ["/app/entrypoint.sh"]
CMD ["server"]
FROM tomcat:6.0-jre7 AS tomcat-base
RUN <<EOF
rm -rf /usr/local/tomcat/webapps/*
adduser --system --no-create-home \
--ingroup www-data \
--shell /bin/false \
--home $CATALINA_HOME \
tomcat
chown -R tomcat: /usr/local/tomcat
EOF
USER tomcat
FROM tomcat-base AS lwmain
COPY --from=build \
/src/legacyworlds-web/legacyworlds-web-main/target/*.war \
$CATALINA_HOME/webapps/ROOT.war
FROM tomcat-base AS lwadmin
COPY --from=build \
/src/legacyworlds-web/legacyworlds-web-main/target/*.war \
$CATALINA_HOME/webapps/ROOT.war