Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
0de9502
Fix to run without compose..
dnil Oct 27, 2022
63e2a73
Separate server docker file perhaps
dnil Oct 27, 2022
2f54ef8
merge dockerfiles
dnil Oct 28, 2022
3d0c8dd
release automation
dnil Oct 28, 2022
b519a36
Merge pull request #1 from dnil/docker_run
dnil Oct 28, 2022
dc90c64
update workflows
dnil Oct 28, 2022
ae9bcec
recursive checkout
dnil Oct 28, 2022
e863e49
publish also latest PRs on main
dnil Oct 28, 2022
12a55a3
Merge pull request #2 from dnil/docker_run
dnil Oct 28, 2022
97dfe3f
Fix to run without compose..
dnil Oct 27, 2022
bc0ae21
Separate server docker file perhaps
dnil Oct 27, 2022
fa8b458
merge dockerfiles
dnil Oct 28, 2022
6eaa3f6
release automation
dnil Oct 28, 2022
c5e0eb8
update workflows
dnil Oct 28, 2022
7402c58
recursive checkout
dnil Oct 28, 2022
6e1b86b
publish also latest PRs on main
dnil Oct 28, 2022
02897ee
Merge branch 'squeezeday-master'
dnil Nov 8, 2022
9b8779b
Merge branch 'squeezeday:master' into main
dnil Apr 6, 2023
32ae4ea
bump version
dnil Apr 6, 2023
4508707
Formdata password
squeezeday Jun 12, 2023
bc13215
Allow multiple CORS origins
Nirmal0809 Feb 17, 2024
ceb4fd0
Merge pull request #1 from Clinical-Genomics/allow_multiple_cors
dnil Sep 26, 2024
fbe925b
Fix #6 - add a CHANGELOG and automated checking
dnil Sep 26, 2024
9b26ea7
Merge pull request #7 from Clinical-Genomics/changelog
dnil Sep 26, 2024
a064e40
Allow multiple CORS origins
Nirmal0809 Feb 17, 2024
a86e2d8
Fix #6 - add a CHANGELOG and automated checking
dnil Sep 26, 2024
6ec89a3
Use CG DockerHub
dnil Sep 27, 2024
97f8cec
Fix #8 - prod automation. Also update docker image
dnil Sep 27, 2024
46db894
Changelog
dnil Sep 27, 2024
8b4d980
Merge branch 'main' into production_automation
dnil Sep 27, 2024
08aec9d
Merge pull request #9 from Clinical-Genomics/production_automation
dnil Sep 27, 2024
0fa0aa6
Use cg dockerhub stage for PR builds
dnil Sep 27, 2024
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
29 changes: 29 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''

---

Thank you for taking the time to contribute an issue!

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Additional context**
Add any other context about the problem here.
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''

---

**Is your feature request related to a problem in the current program to new available techology or software? Please describe and add links/citations if appropriate.**
A clear and concise description of what the problem is or what the advance you would like us to incorporate is. Ex. when triaging structural variantS, I would like to [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
10 changes: 10 additions & 0 deletions .github/ISSUE_TEMPLATE/other-issue.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
name: Other issue
about: Describe your issue, request or question here
title: ''
labels: ''
assignees: ''

---

Try to be as clear and precise as possible, adding sufficient detail and context.
25 changes: 25 additions & 0 deletions .github/workflows/build_and_publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Publish to Docker Hub

on:
release:
types:
- created

jobs:
docker-image-CI:
name: Docker Image CI
runs-on: ubuntu-latest
steps:

- name: Check out git repository
uses: actions/checkout@v4
with:
submodules: 'recursive'

- name: Publish main image (Dockerfile) to Registry
uses: elgohr/Publish-Docker-Github-Action@v5
with:
name: clinicalgenomics/phenopacket-api
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
tags: "latest,${{ github.event.release.tag_name }}"
15 changes: 15 additions & 0 deletions .github/workflows/keep_a_changelog.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: "Changelog Reminder"
on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review, labeled, unlabeled]

jobs:
# Enforces the update of a changelog file on every pull request
changelog:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dangoslen/changelog-enforcer@v3
with:
changeLogPath: 'CHANGELOG.md'
skipLabels: 'Skip-Changelog'
26 changes: 26 additions & 0 deletions .github/workflows/push_build_latest_docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Publish to Docker Hub

on:
pull_request:
branches:
- main

jobs:
docker-image-CI:
name: Docker Image CI
runs-on: ubuntu-latest
steps:

- name: Check out git repository
uses: actions/checkout@v4
with:
submodules: 'recursive'


- name: Publish main image (Dockerfile) to Registry
uses: elgohr/Publish-Docker-Github-Action@v5
with:
name: clinicalgenomics/phenopacket-api-stage
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
tags: "latest, ${{steps.branch-name.outputs.current_branch}}"
15 changes: 15 additions & 0 deletions .github/workflows/woke.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: woke
on:
- pull_request
jobs:
woke:
name: Non-inclusive language check with woke
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: woke
uses: get-woke/woke-action@v0
with:
fail-on-error: false
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Changelog

## [unreleased]
### Changed
- Allow configuring multiple trusted CORS origins
- CG production Docker automation
- CG stage Docker automation
- More recent docker base image

## Legacy version history

## 1.1.0
- Generate password for customformdata
- Backend status
## 1.0.0
- Initial release
10 changes: 7 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:16-alpine as base
FROM node:22-alpine as base
# Create app directory
WORKDIR /usr/src/app
COPY package*.json ./
Expand All @@ -11,14 +11,18 @@ FROM base as build-stage
RUN npm run build

# # stage 2 - copy from buildstage to "prod image"
FROM node:16-alpine as production-stage
FROM node:22-alpine as production-stage
WORKDIR /app
RUN chown node:node .
USER node
COPY package*.json ./
COPY tsconfig.json ./
COPY apischema.json ./

RUN npm ci --only=production
COPY --from=build-stage /usr/src/app/dist ./dist

COPY ./phenopacket-schema ./phenopacket-schema

EXPOSE 3000
CMD ["node", "/app/dist/index.js"]
CMD ["node", "/app/dist/index.js"]
11 changes: 0 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,3 @@ Express + Typescript + MongoDB stack for storing Phenopackets.
`npm install -g protobuf2swagger`

`protobuf2swagger`

## Version history

### 1.0.0

- Initial release

### 1.1.0

- Generate password for customformdata
- Backend status
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ app.use(express.json({ limit: "100mb" }));
app.use(express.urlencoded({ extended: true }));
app.use(
cors({
origin: process.env.ALLOWED_ORIGIN,
origin: process.env.ALLOWED_ORIGIN.split(";"),
})
);

Expand Down