From 5b6e3bcfa9e822496612f59d68303f88315da366 Mon Sep 17 00:00:00 2001 From: Daniel Nilsson Date: Thu, 31 Oct 2024 18:07:39 +0100 Subject: [PATCH 1/2] Fix #11, bump version to 1.2.1 --- .github/workflows/push_build_latest_docker.yml | 6 +++++- CHANGELOG.md | 6 ++++++ Dockerfile | 4 ++-- README.md | 10 ++++++++++ package-lock.json | 4 ++-- package.json | 2 +- 6 files changed, 26 insertions(+), 6 deletions(-) diff --git a/.github/workflows/push_build_latest_docker.yml b/.github/workflows/push_build_latest_docker.yml index f82cda5..089bfb2 100644 --- a/.github/workflows/push_build_latest_docker.yml +++ b/.github/workflows/push_build_latest_docker.yml @@ -16,6 +16,10 @@ jobs: with: submodules: 'recursive' + - name: Get branch name + id: branch-name + uses: tj-actions/branch-names@v7 + - name: Publish main image (Dockerfile) to Registry uses: elgohr/Publish-Docker-Github-Action@v5 with: @@ -23,4 +27,4 @@ jobs: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} dockerfile: Dockerfile-stage - tags: "latest, ${{steps.branch-name.outputs.current_branch}}" + tags: "latest, clinicalgenomics/tip2toe-stage:${{steps.branch-name.outputs.current_branch}}" diff --git a/CHANGELOG.md b/CHANGELOG.md index 36e7bd5..1106d7d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ ## Changelog + +### [1.2.1] +#### Fixed +- Docker prod build +- Docker stage builds use branch name + ### [1.2.0] #### Added - A CHANGELOG diff --git a/Dockerfile b/Dockerfile index 9ab0b0c..190ebb6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,9 +3,9 @@ WORKDIR /app COPY package*.json . COPY tsconfig.json . RUN npm install -RUN npm build -COPY . . +COPY . . +RUN npm run build EXPOSE 5173 CMD ["npm", "run", "preview"] diff --git a/README.md b/README.md index 85f4c84..08432b6 100755 --- a/README.md +++ b/README.md @@ -19,6 +19,16 @@ npm install npm run dev ``` +For a production ready deployment, run +``` +npm install +npm run build +``` +Optionally test that the `dist` build looks good with +``` +npm run preview +``` + ## Credits This service/product uses the Human Phenotype Ontology (version information). Find out more at http://www.human-phenotype-ontology.org diff --git a/package-lock.json b/package-lock.json index fc39289..e5ea6fb 100755 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "react-ts", - "version": "1.2.0", + "version": "1.2.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "react-ts", - "version": "1.2.0", + "version": "1.2.1", "dependencies": { "@headlessui/react": "^1.7.3", "@heroicons/react": "^2.0.8", diff --git a/package.json b/package.json index ebe8594..c9ff88d 100755 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "react-ts", "private": true, - "version": "1.2.0", + "version": "1.2.1", "type": "module", "scripts": { "dev": "vite", From d74ea9365999faaedd4f408a4d7dab224d7fcf9a Mon Sep 17 00:00:00 2001 From: Daniel Nilsson Date: Thu, 31 Oct 2024 18:13:55 +0100 Subject: [PATCH 2/2] branch tag --- .github/workflows/push_build_latest_docker.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/push_build_latest_docker.yml b/.github/workflows/push_build_latest_docker.yml index 089bfb2..d36895f 100644 --- a/.github/workflows/push_build_latest_docker.yml +++ b/.github/workflows/push_build_latest_docker.yml @@ -27,4 +27,4 @@ jobs: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} dockerfile: Dockerfile-stage - tags: "latest, clinicalgenomics/tip2toe-stage:${{steps.branch-name.outputs.current_branch}}" + tags: "latest, ${{steps.branch-name.outputs.current_branch}}"