-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #274 from SynBioDex/synbio-suite-repair
Merge synbio-suite branch into final
- Loading branch information
Showing
145 changed files
with
3,400 additions
and
13,456 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
desktop.ini | ||
*.war | ||
*.class |
Empty file.
This file was deleted.
Oops, something went wrong.
7 changes: 0 additions & 7 deletions
7
.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.jdt.ui.prefs
This file was deleted.
Oops, something went wrong.
2 changes: 0 additions & 2 deletions
2
...data/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.jst.j2ee.webservice.ui.prefs
This file was deleted.
Oops, something went wrong.
2 changes: 0 additions & 2 deletions
2
.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.mylyn.context.core.prefs
This file was deleted.
Oops, something went wrong.
2 changes: 0 additions & 2 deletions
2
.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.mylyn.monitor.ui.prefs
This file was deleted.
Oops, something went wrong.
2 changes: 0 additions & 2 deletions
2
.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.prefs
This file was deleted.
Oops, something went wrong.
Empty file.
Empty file.
43 changes: 0 additions & 43 deletions
43
.metadata/.plugins/org.eclipse.m2e.logback.configuration/logback.1.9.0.20180606-2036.xml
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,49 +1,46 @@ | ||
FROM node:12-alpine | ||
|
||
RUN apk add openjdk8 bash | ||
|
||
ENV JAVA_HOME=/usr/lib/jvm/java-1.8-openjdk | ||
ENV PATH="$JAVA_HOME/bin:${PATH}" | ||
|
||
WORKDIR /opt/backend | ||
|
||
COPY . . | ||
|
||
# This should be in the Dockerfile, but for now it's a script | ||
RUN resources/build_automation/build_backend.sh | ||
|
||
## Build angular stuff and copy into WEB-INF | ||
RUN apk add --update nodejs npm | ||
RUN npm install -g @angular/cli | ||
RUN apk add git | ||
|
||
WORKDIR ./SBOLCanvasFrontend | ||
RUN npm install | ||
RUN npm rebuild node-sass | ||
RUN node --max-old-space-size=8192 | ||
RUN npm run prebuild.prod | ||
RUN ng build --prod --build-optimizer --vendor-chunk --progress --output-hashing=all --stats-json --source-map=true --base-href=/canvas/ | ||
|
||
#RUN resources/build_automation/build_frontend.sh | ||
|
||
# New container | ||
FROM tomcat:9.0-jdk8-openjdk | ||
|
||
# Copy backend | ||
COPY --from=0 /opt/backend/SBOLCanvasBackend/WebContent/api.war webapps | ||
|
||
# Copy frontend | ||
COPY --from=0 /opt/backend/SBOLCanvasFrontend/dist/SBOLCanvasFrontend webapps/canvas | ||
|
||
# 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 | ||
|
||
FROM node:12-alpine as frontend-build | ||
|
||
RUN apk add git | ||
|
||
# copy files -- need to copy whole repo for gitversion | ||
COPY . /opt/canvas | ||
|
||
# build frontend | ||
WORKDIR /opt/canvas/SBOLCanvasFrontend | ||
RUN npm install | ||
RUN npm run gitversion | ||
RUN npm run build | ||
|
||
|
||
FROM tomcat:9.0-jdk8-openjdk as server | ||
|
||
# copy backend files | ||
WORKDIR /opt/backend | ||
COPY SBOLCanvasBackend . | ||
|
||
# make directories | ||
RUN mkdir -p WebContent/WEB-INF/classes | ||
|
||
# compile java files | ||
RUN javac -source 1.8 -target 1.8 -sourcepath src -d WebContent/WEB-INF/classes -cp ".:WebContent/WEB-INF/lib/*:/usr/local/tomcat/lib/*" src/**/*.java | ||
|
||
# build WAR file -- directly into tomcat webapps directory | ||
RUN jar -cf /usr/local/tomcat/webapps/api.war WebContent/* | ||
|
||
|
||
WORKDIR /usr/local/tomcat | ||
|
||
# copy built frontend files | ||
COPY --from=frontend-build /opt/canvas/SBOLCanvasFrontend/dist webapps/canvas | ||
|
||
# copy configs for tomcat | ||
ARG TOMCAT_AUTOMATION_DIR=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 ${TOMCAT_AUTOMATION_DIR}/ROOT_config/index.jsp webapps/ROOT/index.jsp | ||
|
||
COPY ${TOMCAT_AUTOMATION_DIR}/frontend_config_files/frontend_context.html webapps/canvas/META-INF/context.html | ||
COPY ${TOMCAT_AUTOMATION_DIR}/frontend_config_files/frontend_rewrite.config webapps/canvas/WEB-INF/rewrite.config | ||
COPY ${TOMCAT_AUTOMATION_DIR}/frontend_config_files/frontend_web.xml webapps/canvas/WEB-INF/web.xml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,83 @@ | ||
SBOLCavas is a web application for creation and editing of genetic constructs using the SBOL data and visual standard. SBOLCanvas allows a user to create a genetic design from start to finish, with the option to incorporate existing SBOL data from a SynBioHub repository. SBOLCanvas is created as part of [SynBioKS](https://synbioks.github.io/). | ||
|
||
### DOCKER: | ||
# SBOLCanvas | ||
|
||
-SBOLCanvas is a dockerized application and can be found at the repository synbiohub/sbolcanvas. A github action is configured so that upon a commit into the main branch 'final' a new image will be built and pushed to Docker Hub. A running instance of the application can be found at http://canvas.synbioks.org/canvas/ | ||
SBOLCanvas is a web application for creation and editing of genetic constructs using the SBOL data and visual standard. SBOLCanvas allows a user to create a genetic design from start to finish, with the option to incorporate existing SBOL data from a SynBioHub repository. SBOLCanvas is created as part of SynBioKS. | ||
|
||
#### To build & run the docker image locally:<br/> | ||
(from the top level directory of this repository)<br/> | ||
-$docker build -t sbolcanvas/sbolcanvas .<br/> | ||
-$docker run -p 8080:8080 sbolcanvas/sbolcanvas:latest | ||
## SynBioSuite Branch | ||
|
||
#### To run the latest version on the dockerhub repository locally:<br/> | ||
-$docker run --rm -p 8080:8080 synbiohub/sbolcanvas | ||
This branch is specifically for SBOLCanvas as embedded in the [SynBioSuite app](https://github.com/MyersResearchGroup/SynBioSuite); | ||
however, it can still function as a standalone application. | ||
## Repository Structure | ||
|
||
#### To run the current release on the dockerhub repository locally:<br/> | ||
-$docker run --rm -p 8080:8080 synbiohub/sbolcanvas:1.2.0 | ||
This is a monorepo containing an Angular app as a frontend (in the frontend directory) | ||
and a Dockerized Java API (in the backend directory) that handles things like | ||
conversion, communication with SynBioHub, etc. | ||
|
||
This differs from the *final* branch, which Dockerizes the frontend and backend | ||
together, and serves the Angular app from the backend. | ||
|
||
The changes made were an optimization to allow the API to be deployed serverlessly | ||
and the frontend to be deployed as a static web app served from CDNs. | ||
## Run Locally | ||
|
||
Clone the project | ||
|
||
```bash | ||
git clone -b synbio-suite https://github.com/SynBioDex/SBOLCanvas | ||
``` | ||
|
||
Go to the backend directory | ||
|
||
```bash | ||
cd SBOLCanvas/backend | ||
``` | ||
|
||
Ensure you have nodemon installed | ||
|
||
```bash | ||
npm install -g nodemon | ||
``` | ||
|
||
Run nodemon to build and run the backend in a container | ||
|
||
```bash | ||
npx nodemon | ||
``` | ||
|
||
Go to the frontend directory | ||
|
||
```bash | ||
cd ../SBOLCanvas/frontend | ||
``` | ||
|
||
Install dependencies | ||
|
||
```bash | ||
npm install | ||
``` | ||
|
||
Start the Angular development server | ||
|
||
```bash | ||
npm run dev | ||
``` | ||
## Deployment | ||
|
||
To build the frontend, from the frontend directory, run | ||
|
||
```bash | ||
npm run build | ||
``` | ||
|
||
The built output will be available in frontend/dist and can be deployed anywhere | ||
a static web app can be deployed. Genetic Logic Lab's weapon of choice is | ||
[Azure Static Web Apps](https://azure.microsoft.com/en-us/products/app-service/static/). | ||
|
||
To build the backend, from the backend directory, run | ||
|
||
```bash | ||
docker build -t sbolcanvas . | ||
``` | ||
|
||
The resulting Docker image can be deployed anywhere you can run Docker containers. | ||
Genetic Logic Lab uses [Azure Container Apps](https://azure.microsoft.com/en-us/products/container-apps/). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,2 @@ | ||
Manifest-Version: 1.0 | ||
Class-Path: | ||
|
||
Class-Path: |
Binary file not shown.
Binary file not shown.
Binary file removed
BIN
-1.37 KB
SBOLCanvasBackend/WebContent/WEB-INF/classes/data/InteractionInfo.class
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed
BIN
-2.04 KB
SBOLCanvasBackend/WebContent/WEB-INF/classes/servlets/Convert.class
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed
BIN
-1.26 KB
SBOLCanvasBackend/WebContent/WEB-INF/classes/servlets/Export$1.class
Binary file not shown.
Binary file not shown.
Binary file removed
BIN
-7.48 KB
SBOLCanvasBackend/WebContent/WEB-INF/classes/servlets/SynBioHub.class
Binary file not shown.
Binary file not shown.
Binary file removed
BIN
-549 Bytes
SBOLCanvasBackend/WebContent/WEB-INF/classes/utils/Constants.class
Binary file not shown.
Binary file removed
BIN
-727 Bytes
SBOLCanvasBackend/WebContent/WEB-INF/classes/utils/Converter$1.class
Binary file not shown.
Binary file removed
BIN
-620 Bytes
SBOLCanvasBackend/WebContent/WEB-INF/classes/utils/Converter$2.class
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.