Skip to content

Commit

Permalink
Merge pull request #429 from matchID-project/dev
Browse files Browse the repository at this point in the history
Push prioritized jobs to master
  • Loading branch information
rhanka authored Oct 14, 2024
2 parents 818c0d0 + ecb95c8 commit 9c04d3c
Show file tree
Hide file tree
Showing 25 changed files with 1,799 additions and 1,748 deletions.
8 changes: 3 additions & 5 deletions .github/workflows/dockerimage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ jobs:
- uses: actions/checkout@v1
- name: 🐋 Build the master docker image
run: make backend-build-all
env:
NPM_VERBOSE: ""
- name: 👷 Make deploy local
run: make deploy-dependencies
env:
Expand All @@ -30,7 +28,7 @@ jobs:
- name: 🐋 Save docker image
run: make docker-save
- name: ⬆ Upload docker image
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: deces-backend
path: deces-backend.tar
Expand All @@ -42,7 +40,7 @@ jobs:
steps:
- uses: actions/checkout@v1
- name: ⬇ Download docker image
uses: actions/download-artifact@v2
uses: actions/download-artifact@v4
with:
name: deces-backend
- name: 🐳 Load docker image
Expand All @@ -62,7 +60,7 @@ jobs:
run: |
make backend-perf-clinic-stop
- name: 📦 Upload results as job artifact
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: match-results
path: |
Expand Down
5 changes: 3 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ export PORT=8084
export BACKEND=${APP_PATH}/backend
export BACKEND_PORT=8080
export BACKEND_HOST=backend
export APP_URL?=https://${APP_DNS}
export API_URL?=localhost:${PORT}
export API_EMAIL?[email protected]
export API_SSL?=1
Expand Down Expand Up @@ -325,9 +326,9 @@ backend-test-vitest: db-json-fake smtp
@echo Testing API with vitest tests
@if [ ! -f "${BACKEND}/src/routes/routes.ts" ]; then export EXEC_ENV=development; \
export BACKEND_LOG_LEVEL=error; \
${DC_BACKEND} -f ${DC_FILE}-dev-backend.yml run --rm backend npm run tsoa;fi
${DC_BACKEND} -f ${DC_FILE}-dev-backend.yml run --rm backend npm run tsoa --verbose;fi
@export EXEC_ENV=development; export BACKEND_LOG_LEVEL=error; \
${DC_BACKEND} -f ${DC_FILE}-dev-backend.yml run --rm backend npm run test
${DC_BACKEND} -f ${DC_FILE}-dev-backend.yml run --rm backend npm run test --verbose

backend/tests/clients_test.csv:
curl -L https://github.com/matchID-project/examples/raw/master/data/clients_test.csv -o backend/tests/clients_test.csv
Expand Down
170 changes: 0 additions & 170 deletions backend/.eslintrc.js

This file was deleted.

22 changes: 11 additions & 11 deletions backend/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#######################
# Step 1: Base target #
#######################
FROM node:20-slim as base
FROM node:20-slim AS base
ARG http_proxy
ARG https_proxy
ARG no_proxy
Expand Down Expand Up @@ -34,7 +34,7 @@ RUN [ -z "${NPM_LATEST}" ] || npm i npm@latest -g
################################
# Step 2: "development" target #
################################
FROM base as development
FROM base AS development
ARG app_ver
ARG app_path
ARG app_name
Expand Down Expand Up @@ -64,29 +64,29 @@ VOLUME /${app_path}/tests
VOLUME /${app_path}/data

COPY tsconfig.json ./
COPY .eslintrc.js ./
COPY eslint.config.mjs ./

# Expose the listening port of your app
EXPOSE ${port}

CMD ["npm","run", "dev"]
CMD ["npm","run", "dev", "--verbose"]

##########################
# Step 3: "build" target #
##########################
FROM development as build
FROM development AS build

ADD src ./src
COPY src ./src

COPY tsconfig.json ./
COPY .eslintrc.js ./
COPY eslint.config.mjs ./

RUN npm run build && tar czvf dist.tar.gz dist
RUN npm run build --verbose && tar czvf dist.tar.gz dist

###############################
# Step 4: "production" target #
###############################
FROM node:20-alpine3.18 as production
FROM node:20-alpine3.18 AS production
ARG app_path
ARG port
ARG app_ver
Expand All @@ -96,8 +96,8 @@ ENV NODE_ENV=production
WORKDIR /$app_path

COPY package.json ./
ADD tests ./tests
ADD data ./data
COPY tests ./tests
COPY data ./data

# Install production dependencies and clean cache
RUN npm install --production && \
Expand Down
Loading

0 comments on commit 9c04d3c

Please sign in to comment.