chore: integrate both web frontends to the Docker stuff
This commit is contained in:
parent
389304ed4d
commit
523b98f8a3
4 changed files with 44 additions and 2 deletions
|
@ -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
|
||||
|
|
|
@ -17,6 +17,24 @@ services:
|
|||
secrets:
|
||||
- lw_db_password
|
||||
|
||||
web-main:
|
||||
build:
|
||||
context: ..
|
||||
dockerfile: docker/Dockerfile.application
|
||||
target: lwmain
|
||||
restart: always
|
||||
environment:
|
||||
LW_BACKEND_HOST: backend
|
||||
|
||||
web-admin:
|
||||
build:
|
||||
context: ..
|
||||
dockerfile: docker/Dockerfile.application
|
||||
target: lwadmin
|
||||
restart: always
|
||||
environment:
|
||||
LW_BACKEND_HOST: backend
|
||||
|
||||
secrets:
|
||||
lw_db_password:
|
||||
environment: LW_DB_PASSWORD
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
|
||||
<context:annotation-config />
|
||||
<context:component-scan base-package="com.deepclone.lw.web.admin" />
|
||||
<context:property-placeholder />
|
||||
|
||||
<!-- FreeMarker templating library -->
|
||||
<bean id="freemarkerConfig"
|
||||
|
@ -29,7 +30,7 @@
|
|||
<bean id="sessionSrv" class="org.springframework.remoting.rmi.RmiProxyFactoryBean"
|
||||
scope="prototype">
|
||||
<property name="serviceInterface" value="com.deepclone.lw.session.SessionAccessor" />
|
||||
<property name="serviceUrl" value="rmi://localhost:9137/sessionSrv" />
|
||||
<property name="serviceUrl" value="rmi://${LW_BACKEND_HOST}:9137/sessionSrv" />
|
||||
</bean>
|
||||
|
||||
<!-- General web beans -->
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
|
||||
<context:annotation-config />
|
||||
<context:component-scan base-package="com.deepclone.lw.web.main" />
|
||||
<context:property-placeholder />
|
||||
|
||||
<!-- FreeMarker templating library -->
|
||||
<bean id="freemarkerConfig"
|
||||
|
@ -29,7 +30,7 @@
|
|||
<bean id="sessionSrv" class="org.springframework.remoting.rmi.RmiProxyFactoryBean"
|
||||
scope="prototype">
|
||||
<property name="serviceInterface" value="com.deepclone.lw.session.SessionAccessor" />
|
||||
<property name="serviceUrl" value="rmi://localhost:9137/sessionSrv" />
|
||||
<property name="serviceUrl" value="rmi://${LW_BACKEND_HOST}:9137/sessionSrv" />
|
||||
</bean>
|
||||
|
||||
<!-- General web beans -->
|
||||
|
|
Loading…
Reference in a new issue