Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .babelrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{
"presets": ["es2015", "react"],
"plugins": ["transform-decorators-legacy", "transform-class-properties"]
}
35 changes: 35 additions & 0 deletions .github/workflows/docker_release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Build and Push Docker Image

# when to run the workflow
on:
push:
branches: [master]

# the jobs to run
jobs:
build:
# the os to run the job on
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

# build the image now
- name: Build Docker image

run: |
docker build -t evidente:latest .

- name: save images
run: |
docker save evidente:latest | gzip > image_evidente.tar.gz

- name: Release WebImage to Repo
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: image_evidente.tar.gz
asset_name: Evidente
tag: ${{ github.ref }}
overwrite: true
body: "The image for the web app of Evidente"
46 changes: 46 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Use an official Node.js runtime as a parent image
# Using a specific version like '20-bullseye-slim' is reliable
FROM node:20-bullseye-slim

# Set the working directory in the container
WORKDIR /app

# Prevent apt-get from asking for user input
ENV DEBIAN_FRONTEND=noninteractive

# Install Python and pip, then clean up
# 1. Update package lists
# 2. Install python3, python3-pip, and a helper to link 'python' to 'python3'
# 3. Clean up apt cache to reduce image size
RUN apt-get update && \
apt-get install -y python3 python3-pip python-is-python3 && \
rm -rf /var/lib/apt/lists/*

# Install git
RUN apt-get update && \
apt-get install -y git && \
rm -rf /var/lib/apt/lists/*

# install java 17
RUN apt-get update && \
apt-get install -y openjdk-17-jre && \
rm -rf /var/lib/apt/lists/*

COPY src src
COPY public public
COPY package.json package.json
COPY server server
COPY requirements.txt requirements.txt
COPY setup.py setup.py

RUN pip install --no-cache-dir -r requirements.txt
RUN pip install --no-cache-dir .
RUN npm install
RUN npm run build

# expose the port the app runs on
EXPOSE 3000


# Define the command to run the app
CMD ["gunicorn", "--bind", "0.0.0.0:3000", "server.wsgi:app"]
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
"@testing-library/jest-dom": "^4.2.4",
"@testing-library/react": "^9.5.0",
"@testing-library/user-event": "^7.2.1",
"popper.js": "^1.16.1",
"array-move": "^2.2.1",
"bootstrap": "^4.5.0",
"browserify": "^17.0.0",
Expand All @@ -20,16 +19,17 @@
"evergreen-ui": "^2.0.1",
"html2canvas": "^1.3.2",
"jquery": "^3.5.1",
"lodash": "^4.17.21",
"jspdf": "^2.3.1",
"phylotree": "github:mwittep/phylotree.js",
"lodash": "^4.17.21",
"phylotree": "github:Integrative-Transcriptomics/phylotree.js",
"popper.js": "^1.16.1",
"react": "^16.13.1",
"react-bootstrap": "^1.0.1",
"react-color": "^2.18.1",
"react-dom": "^16.13.1",
"react-draggable": "^4.4.3",
"react-loading-overlay": "^1.0.1",
"react-scripts": "^4.*.*",
"react-scripts": "^5.0.1",
"react-select": "^2.4.4",
"react-sortable-hoc": "^1.11.0",
"react-virtualized": "^9.21.2",
Expand All @@ -38,8 +38,8 @@
"scripts": {
"server": "cd server && flask run --no-debugger",
"evidente": "run-p server start",
"start": "react-scripts start",
"build": "react-scripts build",
"start": "react-scripts --openssl-legacy-provider start",
"build": "react-scripts --openssl-legacy-provider build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
Expand Down
5 changes: 3 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ charset-normalizer==2.0.8
click==8.0.3
docopt==0.6.2
Flask==2.0.2
goatools==1.1.6
goatools==1.4.12
idna==3.3
importlib-metadata==4.8.2
itsdangerous==2.0.1
Jinja2==3.0.3
MarkupSafe==2.0.1
numpy==1.21.4
numpy==1.22.0
ordered-set==4.0.2
packaging==21.3
pandas==1.3.4
Expand All @@ -32,3 +32,4 @@ wget==3.2
xlrd==1.2.0
XlsxWriter==3.0.2
zipp==3.6.0
gunicorn==23.0.0
2 changes: 1 addition & 1 deletion server/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,4 +238,4 @@ def index():
if __name__ == "__main__":
mp.set_start_method('spawn')

app.run(debug=True, port=int("3001"))
app.run(port=int("3001"))
4 changes: 4 additions & 0 deletions server/wsgi.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
from server import app

if __name__ == "__main__":
app.run()
Loading