Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
112 commits
Select commit Hold shift + click to select a range
ea13155
feat: add worfklow to deploy to prod.
NishaSharma14 Mar 15, 2023
11440d7
feat: create build as per release version
NishaSharma14 Mar 15, 2023
adfc297
fix: upgrade action version
NishaSharma14 Mar 15, 2023
b69b911
fix: use get-latest-release
NishaSharma14 Mar 15, 2023
dcabcf6
fix: resolve fetch latest release issue
NishaSharma14 Mar 15, 2023
7c255c7
fix: print output of latest-release
NishaSharma14 Mar 15, 2023
9fbb93e
print result
NishaSharma14 Mar 15, 2023
b715b94
print result by removing parameter
NishaSharma14 Mar 15, 2023
b3061e8
fix: update to tag name
NishaSharma14 Mar 15, 2023
73cf306
fix: try to fetch last release name
NishaSharma14 Mar 16, 2023
2df4ebe
print release name
NishaSharma14 Mar 16, 2023
2f24eaa
fix: workflow syntax error
NishaSharma14 Mar 16, 2023
a6d934d
fix: check release cond before building and deploy
NishaSharma14 Mar 16, 2023
fa61163
fix: rectify if cond
NishaSharma14 Mar 16, 2023
982ea86
fix: rectify if cond
NishaSharma14 Mar 16, 2023
2238744
fix: update if cond
NishaSharma14 Mar 16, 2023
e774e81
fix: commit build with Github workflow
NishaSharma14 Mar 16, 2023
9ddc250
test deployment workflow
NishaSharma14 Mar 16, 2023
a0d8f73
fix: run install
NishaSharma14 Mar 16, 2023
bc1eda4
Commit from GitHub Actions (Build and Deploy to Prod)
github-actions[bot] Mar 16, 2023
5a5fd74
test workflow
NishaSharma14 Mar 16, 2023
9aa31b4
test workflow
NishaSharma14 Mar 16, 2023
047a184
test workflow
NishaSharma14 Mar 16, 2023
13e60f8
test workflow
NishaSharma14 Mar 16, 2023
fd00e9e
test workflow
NishaSharma14 Mar 16, 2023
c14c359
test workflow
NishaSharma14 Mar 16, 2023
46c8a5f
Commit from GitHub Actions (Build and Deploy to Prod)
github-actions[bot] Mar 16, 2023
c42994d
fix: add dockerfile for dev
NishaSharma14 Mar 16, 2023
f04772c
Commit from GitHub Actions (Build and Deploy to Prod)
github-actions[bot] Mar 16, 2023
5708043
fix: update release folder
NishaSharma14 Mar 16, 2023
8db4b71
fix: workflow syntax error
NishaSharma14 Mar 16, 2023
732b10a
Commit from GitHub Actions (Build and Deploy to Prod)
github-actions[bot] Mar 16, 2023
b835809
fix: update nginx docker
NishaSharma14 Mar 16, 2023
3d19ce7
Commit from GitHub Actions (Build and Deploy to Prod)
github-actions[bot] Mar 16, 2023
44c1ddc
fix: update comments and point to prod
NishaSharma14 Mar 16, 2023
cb9bace
fix: workflow syntax error
NishaSharma14 Mar 16, 2023
215d2f9
cleanup
NishaSharma14 Mar 16, 2023
7f8b5e0
fix: add e2e test to main worflow
NishaSharma14 Mar 16, 2023
9373b35
fix: update prod build to remove the test
NishaSharma14 Mar 24, 2023
026cc38
fix: remove needs dependency
NishaSharma14 Mar 24, 2023
78df5e7
Merge branch 'main' of https://github.com/NFDI4Chem/nmrium-react-wrap…
NishaSharma14 Mar 24, 2023
ca7efa3
fix: create release for v0.1.0
NishaSharma14 Mar 27, 2023
32811c1
Commit from GitHub Actions (Build and Deploy to Prod)
github-actions[bot] Mar 27, 2023
e878895
Merge branch 'main' of https://github.com/NFDI4Chem/nmrium-react-wrap…
NishaSharma14 Mar 30, 2023
6653771
Merge branch 'main' of https://github.com/NFDI4Chem/nmrium-react-wrap…
NishaSharma14 Mar 30, 2023
f53fd9b
Commit from GitHub Actions (Build and Deploy to Prod)
github-actions[bot] Mar 31, 2023
a4f15f7
Merge branch 'main' of https://github.com/NFDI4Chem/nmrium-react-wrap…
NishaSharma14 Apr 5, 2023
66abfd5
Commit from GitHub Actions (Build and Deploy to Prod)
github-actions[bot] Apr 5, 2023
1eb17b6
Merge branch 'main' of https://github.com/NFDI4Chem/nmrium-react-wrap…
NishaSharma14 Apr 5, 2023
edf8698
Merge branch 'prod-helm-deploy' of https://github.com/NFDI4Chem/nmriu…
NishaSharma14 Apr 5, 2023
6725d71
Commit from GitHub Actions (Build and Deploy to Prod)
github-actions[bot] Apr 5, 2023
890ed4b
v0.1.0 whitelist issue patch
NishaSharma14 May 22, 2023
4aeb840
Commit from GitHub Actions (Build and Deploy to Prod)
github-actions[bot] May 22, 2023
7e0522b
Merge branch 'main' of https://github.com/NFDI4Chem/nmrium-react-wrap…
NishaSharma14 May 22, 2023
90689ed
Commit from GitHub Actions (Build and Deploy to Prod)
github-actions[bot] May 22, 2023
7e2501d
feat: v0.1.0 updates
vcnainala May 31, 2023
d4d4b1b
Commit from GitHub Actions (Build and Deploy to Prod)
github-actions[bot] May 31, 2023
c9994e8
fix: v0.1.0 URL bug fix patch
vcnainala Jun 1, 2023
a81929c
Commit from GitHub Actions (Build and Deploy to Prod)
github-actions[bot] Jun 1, 2023
74801f5
feat: updated release v0.1.0 version build
vcnainala Jun 2, 2023
8188a6b
Commit from GitHub Actions (Build and Deploy to Prod)
github-actions[bot] Jun 2, 2023
979dfc0
Merge branch 'main' of https://github.com/NFDI4Chem/nmrium-react-wrap…
NishaSharma14 Jul 26, 2023
efbb97b
Commit from GitHub Actions (Build and Deploy to Prod)
github-actions[bot] Jul 26, 2023
a4bb601
build: move docker image to Docker Hub
NishaSharma14 Sep 11, 2023
1d1683c
build: add docker login
NishaSharma14 Sep 11, 2023
c80f38d
build: push image to both Google Artifact
NishaSharma14 Sep 12, 2023
acb9881
Merge branch 'main' of https://github.com/NFDI4Chem/nmrium-react-wrap…
NishaSharma14 Oct 19, 2023
10a2d6c
build: add docker login step
NishaSharma14 Oct 19, 2023
4f843c3
Commit from GitHub Actions (Build and Deploy to Prod)
github-actions[bot] Oct 19, 2023
e14b748
build: create v0.4.1 and delete v1.0.0
NishaSharma14 Oct 23, 2023
d98ac4b
Commit from GitHub Actions (Build and Deploy to Prod)
github-actions[bot] Oct 23, 2023
e8ecdcf
build: create release for v0.5.0
NishaSharma14 Oct 23, 2023
00641fd
Commit from GitHub Actions (Build and Deploy to Prod)
github-actions[bot] Oct 23, 2023
48dd1c5
Merge branch 'main' of https://github.com/NFDI4Chem/nmrium-react-wrap…
NishaSharma14 Dec 20, 2023
42edbde
Commit from GitHub Actions (Build and Deploy to Prod)
github-actions[bot] Dec 20, 2023
543931a
Merge branch 'main' of https://github.com/NFDI4Chem/nmrium-react-wrap…
NishaSharma14 Dec 20, 2023
6f8fdfa
Commit from GitHub Actions (Build and Deploy to Prod)
github-actions[bot] Dec 20, 2023
ea44f32
revert release v0.5.0 to old version
NishaSharma14 Dec 20, 2023
32561d1
Commit from GitHub Actions (Build and Deploy to Prod)
github-actions[bot] Dec 20, 2023
9e27bc7
Merge branch 'main' of https://github.com/NFDI4Chem/nmrium-react-wrap…
NishaSharma14 Feb 5, 2024
9364136
Commit from GitHub Actions (Build and Deploy to Prod)
github-actions[bot] Feb 5, 2024
b1126cc
Merge branch 'main' of https://github.com/NFDI4Chem/nmrium-react-wrap…
NishaSharma14 Feb 19, 2024
ccac5fc
Commit from GitHub Actions (Build and Deploy to Prod)
github-actions[bot] Feb 19, 2024
7c78692
Merge branch 'main' of https://github.com/NFDI4Chem/nmrium-react-wrap…
NishaSharma14 Mar 20, 2024
7b7d9f4
Commit from GitHub Actions (Build and Deploy to Prod)
github-actions[bot] Mar 20, 2024
14b801e
update the prod action
NishaSharma14 Mar 20, 2024
1513dbb
Merge branch 'prod-helm-deploy' of https://github.com/NFDI4Chem/nmriu…
NishaSharma14 Mar 20, 2024
9dc3c8a
Commit from GitHub Actions (Build and Deploy to Prod)
github-actions[bot] Mar 20, 2024
12af695
Merge remote-tracking branch 'origin/main' into prod-helm-deploy
sriramkanakam87 Mar 26, 2024
1f9a19c
Commit from GitHub Actions (Build and Deploy to Prod)
github-actions[bot] Mar 26, 2024
58a4a68
fix: update release action
NishaSharma14 Apr 2, 2024
8da4113
Commit from GitHub Actions (Build and Deploy to Prod)
github-actions[bot] Apr 2, 2024
6b47e15
fix: remove version fetch
NishaSharma14 Apr 2, 2024
c8654ea
Merge branch 'main' into prod-helm-deploy
sriramkanakam87 Jun 21, 2024
047f52a
Commit from GitHub Actions (Build and Deploy to Prod)
github-actions[bot] Jun 21, 2024
fcbe595
Update prod-build.yml
vcnainala Jul 1, 2024
e465718
Commit from GitHub Actions (Build and Deploy to Prod)
github-actions[bot] Jul 1, 2024
4f798a1
chore: update dependencies
hamed-musallam Mar 26, 2025
bfcc475
feat: update NMRium beta to version 0.62.1-pre.1742933761
hamed-musallam Mar 26, 2025
6a7784d
chore: update dependencies
hamed-musallam Apr 9, 2025
ce6a04f
feat: update nmrium to version 0.62.1
hamed-musallam Apr 9, 2025
e948c18
chore: prevent upgrade to React 19
hamed-musallam Apr 9, 2025
45a4695
fix: various workflow updates, docker file changes and old files tidy up
vcnainala Apr 17, 2025
36fd947
fix: updated docker files for VM based deployments
vcnainala Apr 17, 2025
8a719b6
Merge branch 'development' into prod-helm-deploy
vcnainala Apr 17, 2025
2b45110
fix: various build updates and bug fixes
vcnainala Apr 17, 2025
07638d2
fix: updated default release version to latest
vcnainala Apr 17, 2025
954bd91
Update dev-build.yml
vcnainala Apr 22, 2025
58b93f2
feat: update NMRium to version 0.62.1
hamed-musallam Apr 22, 2025
18d9eba
Merge pull request #253 from NFDI4Chem/update-nmrium-v0.62.1
vcnainala Apr 22, 2025
95cf519
chore: update dependencies
hamed-musallam Apr 22, 2025
99782de
chore: run test server on 'dist' directory
hamed-musallam Apr 22, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
25 changes: 0 additions & 25 deletions .github/workflows/dev-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@ on:
branches: [development]

env:
PROJECT_ID: ${{ secrets.GKE_PROJECT }}
GKE_CLUSTER_DEV: nmrxiv-dev
GKE_ZONE: europe-west3-a
DEPLOYMENT_NAME: nmrxiv-nmrium
DOCKER_HUB_USERNAME : ${{ secrets.DOCKER_HUB_USERNAME }}
DOCKER_HUB_PASSWORD : ${{ secrets.DOCKER_HUB_PASSWORD }}
Expand Down Expand Up @@ -46,21 +43,6 @@ jobs:
VERSION=${GITHUB_REF//*\/}
echo "export default { version: '$VERSION' };" > src/versionInfo.ts

# Setup gcloud CLI
- name: Setup CLI
uses: google-github-actions/setup-gcloud@94337306dda8180d967a56932ceb4ddcf01edae7
with:
service_account_key: ${{ secrets.GKE_SA_KEY }}
project_id: ${{ secrets.GKE_PROJECT }}

# Get the GKE credentials so we can deploy to the cluster
- name: Get GKE credentials
uses: google-github-actions/[email protected]
with:
cluster_name: ${{ env.GKE_CLUSTER_DEV }}
location: ${{ env.GKE_ZONE }}
credentials: ${{ secrets.GKE_SA_KEY }}

- name: Log in to Docker Hub
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a
with:
Expand All @@ -78,10 +60,3 @@ jobs:
tags: ${{ env.REPOSITORY_NAMESPACE }}/${{ env.REPOSITORY_NAME }}:dev-latest
username: ${{ env.DOCKER_HUB_USERNAME }}
password: ${{ env.DOCKER_HUB_PASSWORD }}

# Deploy the latest Docker image to the GKE cluster
- name: Deploy
run: |-
kubectl rollout restart deployment/$DEPLOYMENT_NAME
kubectl rollout status deployment/$DEPLOYMENT_NAME --timeout=300s
kubectl get services -o wide
79 changes: 79 additions & 0 deletions .github/workflows/prod-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
# This worklflow will perform following actions when a release is published:
# - Fetch Latest release.
# - Build the latest docker image in production.
# - Build release and commit to repo.
# - Push the docker image to Github Artifact Registry-Prod.
# - Rollout latest docker image to GKE.
#
# Maintainers:
# - name: Nisha Sharma
# - email: [email protected]

name : Build and Deploy to Prod

on:
push:
branches: [prod-helm-deploy]

env:
DEPLOYMENT_NAME: nmrxiv-nmrium
DOCKER_HUB_USERNAME : ${{ secrets.DOCKER_HUB_USERNAME }}
DOCKER_HUB_PASSWORD : ${{ secrets.DOCKER_HUB_PASSWORD }}
REPOSITORY_NAME: nmrium-react-wrapper
REPOSITORY_NAMESPACE: nfdi4chem

jobs:
setup-build-publish-deploy-prod:
name: Deploy to prod
if: github.ref == 'refs/heads/prod-helm-deploy'
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/[email protected]

# Login to Docker Hub
- name: Log in to Docker Hub
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a
with:
username: ${{ env.DOCKER_HUB_USERNAME }}
password: ${{ env.DOCKER_HUB_PASSWORD }}

#Fetch latest release
- name: Fetch latest release
id: fetch-latest-release
uses: InsonusK/[email protected]
with:
myToken: ${{ github.token }}
exclude_types: "draft|prerelease"
view_top: 10
- name: "Print release name"
run: |
echo "tag_name: ${{ steps.fetch-latest-release.outputs.tag_name }}"

#Build and push Docker image to Docker Hub
- name: Build and push Docker image
uses: docker/build-push-action@v4
with:
context: .
file: ./Dockerfile.prod
push: true
build-args: |
RELEASE_VERSION=${{ steps.fetch-latest-release.outputs.tag_name }}
tags: ${{ env.REPOSITORY_NAMESPACE }}/${{ env.REPOSITORY_NAME }}:${{ steps.fetch-latest-release.outputs.tag_name }}, ${{ env.REPOSITORY_NAMESPACE }}/${{ env.REPOSITORY_NAME }}:latest
username: ${{ env.DOCKER_HUB_USERNAME }}
password: ${{ env.DOCKER_HUB_PASSWORD }}

# Build npm for release
- name: Build npm
run: |-
npm install
# Build for main distribution
VITE_BUILD_OUT_DIR=dist npm run build
# Build for specific version
VITE_BUILD_OUT_DIR=releases/${{ steps.fetch-latest-release.outputs.tag_name }} npm run build

# Commit
- name: Commit to repo
uses: EndBug/[email protected]
with:
default_author: github_actions
6 changes: 3 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@
# testing
/coverage

# production
/build

/lib
/lib-cjs

Expand All @@ -34,3 +31,6 @@ yarn.lock

/test-results
/playwright-report

build/
dist/
6 changes: 6 additions & 0 deletions .ncurc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Do not update to React 19 because some packages not compatible with React 19
reject:
- react
- react-dom
- '@types/react'
- '@types/react-dom'
11 changes: 0 additions & 11 deletions Dockerfile

This file was deleted.

5 changes: 3 additions & 2 deletions Dockerfile.dev
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# build environment
FROM node:22-alpine as build
FROM node:22-alpine3.18 AS build

WORKDIR /app
ENV PATH /app/node_modules/.bin:$PATH
COPY package.json ./
Expand All @@ -12,7 +13,7 @@ RUN npm run build

# production environment
FROM nginx:stable-alpine
COPY --from=build /app/build /usr/share/nginx/html
COPY --from=build /app/dist /usr/share/nginx/html
COPY nginx/nginx.conf /etc/nginx/conf.d/default.conf
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]
37 changes: 27 additions & 10 deletions Dockerfile.prod
Original file line number Diff line number Diff line change
@@ -1,23 +1,40 @@
# build environment
FROM node:22-alpine3.18 as build
# Build stage
FROM node:22-alpine3.18 AS builder

# ARG RELEASE_VERSION
# ENV RELEASE_VERSION=${RELEASE_VERSION}
# Declare build argument
ARG RELEASE_VERSION
ENV RELEASE_VERSION=${RELEASE_VERSION}

WORKDIR /app
ENV PATH /app/node_modules/.bin:$PATH
ENV PATH=/app/node_modules/.bin:$PATH

# Install dependencies first
COPY package.json ./
RUN export NODE_OPTIONS=--max-old-space-size=8192
RUN npm i --silent
RUN npm i react-scripts@latest -g --silent

# Copy source and build
COPY . ./
RUN echo "export default { version: '$RELEASE_VERSION' };" > src/versionInfo.ts
RUN npm run build -- --outDir=build
RUN npm run build -- --outDir=build/releases/v0.0.1
RUN echo "export default { version: '${RELEASE_VERSION}' };" > src/versionInfo.ts

# production environment
# Create releases directory and build
RUN mkdir -p /app/releases/${RELEASE_VERSION} && \
npm run build && \
cp -r dist/* /app/releases/${RELEASE_VERSION}/

# Production stage
FROM nginx:stable-alpine
COPY --from=build /app/build /usr/share/nginx/html

# Copy built files from builder
COPY --from=builder /app/dist /usr/share/nginx/html
COPY --from=builder /app/releases/${RELEASE_VERSION} /usr/share/nginx/html

# Copy nginx configuration
COPY nginx/nginx.conf /etc/nginx/conf.d/default.conf

# Expose port 80
EXPOSE 80

# Start nginx
CMD ["nginx", "-g", "daemon off;"]
70 changes: 0 additions & 70 deletions README.old.md

This file was deleted.

46 changes: 46 additions & 0 deletions docker-compose.local.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
services:
# Development environment
nmrium-dev:
container_name: nmrium-dev
build:
context: .
dockerfile: Dockerfile.dev
restart: always
networks:
- nmrium-network
environment:
- NODE_ENV=development
- CHOKIDAR_USEPOLLING=true

# Production environment
nmrium-prod:
container_name: nmrium-prod
build:
context: .
dockerfile: Dockerfile.prod
args:
- RELEASE_VERSION=latest
ports:
- "80:80"
restart: always
networks:
- nmrium-network

# Nginx reverse proxy
nginx-proxy:
container_name: nginx-proxy
image: nginx:stable-alpine
ports:
- "8080:80" # Dev environment on port 8080
- "8081:81" # Prod environment on port 8081
volumes:
- ./nginx/proxy.conf:/etc/nginx/conf.d/default.conf
depends_on:
- nmrium-dev
- nmrium-prod
networks:
- nmrium-network

networks:
nmrium-network:
driver: bridge
Loading
Loading