Skip to content

Commit

Permalink
Building but cant access via browser.
Browse files Browse the repository at this point in the history
  • Loading branch information
Sam Bridge authored and Sam Bridge committed Mar 10, 2020
1 parent 11ad171 commit c0e8329
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 10 deletions.
16 changes: 14 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,18 @@ RUN npm install -g @angular/cli
RUN resources/build_automation/build_frontend.sh

# New container
FROM tomcat:9.0-jdk8-openjdk
COPY --from=0 SBOLCanvasBackend/WebContent/api.war webapps
FROM tomcat:9.0-jdk8-openjdk
COPY --from=0 /opt/backend/SBOLCanvasBackend/WebContent/api.war webapps

# Copying configs for tomcat
ARG TOMCAT_AUTOMATION_DIR=/opt/backend/resources/server_automation/tomcat
COPY --from=0 ${TOMCAT_AUTOMATION_DIR}/base_config_files/tomcat-users.xml ${TOMCAT_AUTOMATION_DIR}/base_config_files/web.xml conf/
COPY --from=0 ${TOMCAT_AUTOMATION_DIR}/base_config_files/server.xml conf/
COPY --from=0 ${TOMCAT_AUTOMATION_DIR}/base_config_files/manager-context.xml webapps/manager/META-INF/context.xml
COPY --from=0 ${TOMCAT_AUTOMATION_DIR}/base_config_files/host-manager-context.xml webapps/host-manager/META-INF/context.xml
COPY --from=0 ${TOMCAT_AUTOMATION_DIR}/ROOT_config/index.jsp webapps/ROOT/index.jsp

COPY --from=0 ${TOMCAT_AUTOMATION_DIR}/frontend_config_files/frontend_context.html webapps/canvas/META-INF/context.html
COPY --from=0 ${TOMCAT_AUTOMATION_DIR}/frontend_config_files/frontend_rewrite.config webapps/canvas/WEB-INF/rewrite.config
COPY --from=0 ${TOMCAT_AUTOMATION_DIR}/frontend_config_files/frontend_web.xml webapps/canvas/WEB-INF/web.xml

2 changes: 2 additions & 0 deletions resources/build_automation/build_backend.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,5 @@ javac -source 1.8 -target 1.8 -sourcepath ${compile_source_dir} -d ${compile_des
# Build .war file and deploy
cd ${BACKEND_DIR}/WebContent
jar -cf ${war_filename} *
echo "$PWD"
echo $(ls)
2 changes: 2 additions & 0 deletions resources/build_automation/build_frontend.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,7 @@ cur_dir=$(pwd) # Save away our current directory to come back to.
cd SBOLCanvasFrontend
npm install
#ng build --prod --base-href=/canvas/
npm rebuild node-sass
node --max-old-space-size=8192
ng build --prod --build-optimizer --vendor-chunk --progress --output-hashing=all --stats-json --source-map=true --base-href=/canvas/

13 changes: 5 additions & 8 deletions resources/server_automation/tomcat/base_config_files/server.xml
Original file line number Diff line number Diff line change
Expand Up @@ -66,15 +66,12 @@
APR (HTTP/AJP) Connector: /docs/apr.html
Define a non-SSL/TLS HTTP/1.1 Connector on port 8080
-->
<Connector port="8080" protocol="HTTP/1.1" redirectPort="443"/>
<Connector port="80" protocol="HTTP/1.1" redirectPort="443"/>
<!--<Connector port="8080" protocol="HTTP/1.1" redirectPort="443"/>
<Connector port="80" protocol="HTTP/1.1" redirectPort="443"/> -->
<!-- A "Connector" using the shared thread pool-->
<!--
<Connector executor="tomcatThreadPool"
port="8080" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" />
-->
connectionTimeout="20000"/>
<!-- Define an SSL/TLS HTTP/1.1 Connector on port 8443
This connector uses the NIO implementation. The default
SSLImplementation will depend on the presence of the APR/native
Expand All @@ -84,15 +81,15 @@
the SSLImplementation selected. JSSE style configuration is used below.
-->

<Connector port="443" protocol="org.apache.coyote.http11.Http11NioProtocol"
<!-- <Connector port="443" protocol="org.apache.coyote.http11.Http11NioProtocol"
maxThreads="150" SSLEnabled="true">
<SSLHostConfig>
<Certificate certificateKeystoreFile="conf/sbolcanvas.org.jks"
certificateKeystorePassword="sbol_rocks1234!@#$"
type="RSA" />
</SSLHostConfig>
</Connector>

-->
<!-- Define an SSL/TLS HTTP/1.1 Connector on port 8443 with HTTP/2
This connector uses the APR/native implementation which always uses
OpenSSL for TLS.
Expand Down

0 comments on commit c0e8329

Please sign in to comment.