mirror of
https://github.com/OneUptime/oneuptime
synced 2024-11-22 07:10:53 +00:00
container-scan-work
This commit is contained in:
parent
5661113fea
commit
e02e54d5d7
27
container-scanner/Dockerfile
Executable file
27
container-scanner/Dockerfile
Executable file
@ -0,0 +1,27 @@
|
|||||||
|
#
|
||||||
|
# Fyipe-backend Dockerfile
|
||||||
|
#
|
||||||
|
|
||||||
|
# Pull base image nodejs image.
|
||||||
|
FROM node:16
|
||||||
|
|
||||||
|
#SET ENV Variables
|
||||||
|
ENV PRODUCTION=true
|
||||||
|
|
||||||
|
RUN mkdir -p /usr/src/app
|
||||||
|
|
||||||
|
WORKDIR /usr/src/app
|
||||||
|
|
||||||
|
# Install app dependencies
|
||||||
|
COPY package*.json /usr/src/app/
|
||||||
|
RUN npm ci --only=production
|
||||||
|
|
||||||
|
# Bundle app source
|
||||||
|
COPY . /usr/src/app
|
||||||
|
|
||||||
|
# Expose ports.
|
||||||
|
# - 3055: Container Scanner
|
||||||
|
EXPOSE 3055
|
||||||
|
|
||||||
|
#Run the app
|
||||||
|
CMD [ "npm", "start"]
|
26
container-scanner/Dockerfile.dev
Normal file
26
container-scanner/Dockerfile.dev
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
#
|
||||||
|
# Fyipe-backend Dockerfile
|
||||||
|
#
|
||||||
|
|
||||||
|
# Pull base image nodejs image.
|
||||||
|
FROM node:16
|
||||||
|
|
||||||
|
WORKDIR /usr/src/app
|
||||||
|
|
||||||
|
# Install app dependencies
|
||||||
|
RUN cd /usr/src/app
|
||||||
|
|
||||||
|
# Copy package.json files
|
||||||
|
COPY ./package.json /usr/src/app/package.json
|
||||||
|
COPY ./package-lock.json /usr/src/app/package-lock.json
|
||||||
|
|
||||||
|
|
||||||
|
RUN npm ci
|
||||||
|
|
||||||
|
# Expose ports.
|
||||||
|
# - 3055: Container Scanner
|
||||||
|
EXPOSE 3055
|
||||||
|
|
||||||
|
#Run the app
|
||||||
|
CMD [ "npm", "run", "dev"]
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
@ -5,7 +5,8 @@
|
|||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "node --max-old-space-size=4096 --max-http-header-size=80000 index.js",
|
"start": "node --max-old-space-size=4096 --max-http-header-size=80000 index.js",
|
||||||
"test": "echo \"Error: no test specified\" && exit 1"
|
"test": "echo \"Error: no test specified\" && exit 1",
|
||||||
|
"dev": "node --max-old-space-size=4096 --max-http-header-size=80000 index.js"
|
||||||
},
|
},
|
||||||
"author": "David Adewole",
|
"author": "David Adewole",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
@ -285,6 +285,26 @@ services:
|
|||||||
# Use node modules of the container and not host system.
|
# Use node modules of the container and not host system.
|
||||||
# https://stackoverflow.com/questions/29181032/add-a-volume-to-docker-but-exclude-a-sub-folder
|
# https://stackoverflow.com/questions/29181032/add-a-volume-to-docker-but-exclude-a-sub-folder
|
||||||
- /usr/src/app/node_modules/
|
- /usr/src/app/node_modules/
|
||||||
|
container-scanner:
|
||||||
|
ports:
|
||||||
|
- '3055:3055'
|
||||||
|
- '9242:9229' # Debugging port.
|
||||||
|
build:
|
||||||
|
context: ./container-scanner
|
||||||
|
dockerfile: ./Dockerfile.dev
|
||||||
|
env_file:
|
||||||
|
- ./container-scanner/.env
|
||||||
|
environment:
|
||||||
|
- PORT=3055
|
||||||
|
- SERVER_URL=http://backend:3002
|
||||||
|
- CONTAINER_SCANNER_NAME=US
|
||||||
|
- CONTAINER_SCANNER_KEY=test-key
|
||||||
|
- IS_SAAS_SERVICE=${IS_SAAS_SERVICE}
|
||||||
|
volumes:
|
||||||
|
- ./container-scanner:/usr/src/app
|
||||||
|
# Use node modules of the container and not host system.
|
||||||
|
# https://stackoverflow.com/questions/29181032/add-a-volume-to-docker-but-exclude-a-sub-folder
|
||||||
|
- /usr/src/app/node_modules/
|
||||||
lighthouse-runner:
|
lighthouse-runner:
|
||||||
ports:
|
ports:
|
||||||
- '3015:3015'
|
- '3015:3015'
|
||||||
|
@ -195,6 +195,18 @@ services:
|
|||||||
- IS_SAAS_SERVICE=${IS_SAAS_SERVICE}
|
- IS_SAAS_SERVICE=${IS_SAAS_SERVICE}
|
||||||
depends_on:
|
depends_on:
|
||||||
- backend
|
- backend
|
||||||
|
container-scanner:
|
||||||
|
ports:
|
||||||
|
- '3055:3055'
|
||||||
|
build: ./container-scanner
|
||||||
|
env_file:
|
||||||
|
- ./container-scanner/.env
|
||||||
|
environment:
|
||||||
|
- PORT=3055
|
||||||
|
- SERVER_URL=http://backend:3002
|
||||||
|
- IS_SAAS_SERVICE=${IS_SAAS_SERVICE}
|
||||||
|
depends_on:
|
||||||
|
- backend
|
||||||
lighthouse-runner:
|
lighthouse-runner:
|
||||||
ports:
|
ports:
|
||||||
- '3015:3015'
|
- '3015:3015'
|
||||||
|
Loading…
Reference in New Issue
Block a user