Skip to content

Commit

Permalink
update dockerfile to build js-component
Browse files Browse the repository at this point in the history
  • Loading branch information
t0mdavid-m committed Mar 21, 2024
1 parent 766e1fa commit d1e9e7c
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 1 deletion.
26 changes: 26 additions & 0 deletions .github/workflows/build-windows-executable-app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,32 @@ jobs:
OPENMS_VERSION: 3.0.0

steps:

# Step to set up Node.js environment
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '16' # Specify your required Node.js version

# Step to clone the Vue.js repository
- name: Checkout Vue.js repository
uses: actions/checkout@v3
with:
repository: 't0mdavid-m/openms-streamlit-vue-component'
ref: 'TaggerViewer' # Specify the branch you want to checkout
path: 'openms-streamlit-vue-component' # Specify the path to clone the repo into

# Step to install npm dependencies and build the Vue.js component
- name: Install and build Vue.js component
run: |
cd openms-streamlit-vue-component
npm install
npm run build
cd ..
mkdir dist/js-component
mkdir dist/js-component/dist
cp -r openms-streamlit-vue-component/dist/* dist/js-component/dist/
- name: Checkout
uses: actions/checkout@v3
with:
Expand Down
19 changes: 19 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,25 @@
# debug container after build (comment out ENTRYPOINT) and run container with interactive /bin/bash shell
# prune unused images/etc. to free disc space (e.g. might be needed on gitpod). Use with care.: docker system prune --all --force


# Build JS-component
FROM node:21 AS js-build

# JS Component
ARG VUE_REPO=https://github.com/t0mdavid-m/openms-streamlit-vue-component.git
ARG VUE_BRANCH=TaggerViewer


RUN git clone -b ${VUE_BRANCH} --single-branch ${VUE_REPO}
WORKDIR /openms-streamlit-vue-component
RUN npm install
RUN npm run build

FROM ubuntu:22.04 AS setup-build-system
WORKDIR /

COPY --from=js-build openms-streamlit-vue-component/dist /app/js-component/dist

ARG OPENMS_REPO=https://github.com/t0mdavid-m/OpenMS.git
ARG OPENMS_BRANCH=TaggerViewerDeployment
ARG PORT=8501
Expand All @@ -18,6 +36,7 @@ ARG GITHUB_USER=OpenMS
# Streamlit app Gihub repository name (to download artifact from).
ARG GITHUB_REPO=streamlit-template


USER root

# Install required Ubuntu packages.
Expand Down

0 comments on commit d1e9e7c

Please sign in to comment.