Skip to content

hotfix/inc-15 #298

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 14 commits into from
Dec 9, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
14 changes: 9 additions & 5 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
version: 2
defaults: &defaults
docker:
- image: circleci/python:2.7-stretch-browsers
- image: cimg/python:3.11.0-browsers
install_dependency: &install_dependency
name: Installation of build and deployment dependencies.
command: |
sudo apt install jq
sudo pip install awscli --upgrade
sudo pip install docker-compose
sudo apt install jq
sudo apt update
sudo apt install python3-pip
sudo pip3 install awscli --upgrade
sudo pip3 install docker-compose

install_deploysuite: &install_deploysuite
name: Installation of install_deploysuite.
Expand Down Expand Up @@ -72,4 +74,6 @@ workflows:
context : org-global
filters:
branches:
only: master
only:
- master
- hotfix/inc-15
14 changes: 0 additions & 14 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ const swaggerUi = require('swagger-ui-express')
const YAML = require('yamljs')
const authenticator = require('tc-core-library-js').middleware.jwtAuthenticator
const fileUpload = require('express-fileupload')
const memwatch = require('memwatch-next')

const swaggerDocument = YAML.load('./docs/swagger.yaml')
const app = express()
Expand All @@ -31,19 +30,6 @@ app.use(bodyParser.urlencoded({ limit: '50mb', extended: true }))
app.use(cors())
app.use(fileUpload())

memwatch.on('leak', function (info) {
winston.info(`Memory leak detected, details: ${info}`)
const reqBody = {
topic: 'common.error.reporting',
originator: 'submission-api',
timestamp: (new Date()).toISOString(), // time when submission was created
'mime-type': 'application/json',
payload: info
}

helper.postToBusApi(reqBody)
})

const apiRouter = express.Router()

/**
Expand Down
8 changes: 4 additions & 4 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Use the base image with Node.js 8.11.3
FROM node:8.11.3
# Use the base image with Node.js
FROM node:12.22.12-buster

# Copy the current directory into the Docker image
COPY . /submissions-api
Expand All @@ -8,5 +8,5 @@ COPY . /submissions-api
WORKDIR /submissions-api

# Install the dependencies from package.json
RUN npm install
ENTRYPOINT npm start
RUN yarn install
ENTRYPOINT yarn start
Loading