Skip to content
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
48 changes: 24 additions & 24 deletions .github/workflows/master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,35 +54,35 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

# docker:
# name: Publish Docker Image
# needs: [ build-test ]
# runs-on: ubuntu-latest
# if: success() && github.ref == 'refs/heads/master'
docker:
name: Publish Docker Image
needs: [ build-test ]
runs-on: ubuntu-latest
if: success() && github.ref == 'refs/heads/master'

# outputs:
# digest: ${{ steps.docker_build.outputs.digest }}
outputs:
digest: ${{ steps.docker_build.outputs.digest }}

# steps:
# - name: Set up QEMU
# uses: docker/setup-qemu-action@v2
steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v2

# - name: Set up Docker Buildx
# uses: docker/setup-buildx-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

# - name: Login to DockerHub
# uses: docker/login-action@v2
# with:
# username: ${{ secrets.DOCKERHUB_USERNAME }}
# password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

# - name: Build and push
# id: docker_build
# uses: docker/build-push-action@v3
# with:
# push: true
# platforms: linux/amd64,linux/arm64
# tags: trackerforce/switcher-resolver-node:latest
- name: Build and push
id: docker_build
uses: docker/build-push-action@v3
with:
push: true
platforms: linux/amd64,linux/arm64
tags: trackerforce/switcher-resolver-node:latest

# update-kustomize:
# name: Deploy
Expand Down
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ Resolver Node for Component Switchers<br>

<div align="center">

[![Master CI](https://github.com/switcherapi/switcher-resolver-node/actions/workflows/master.yml/badge.svg?branch=master)](https://github.com/switcherapi/switcher-resolver-node/actions/workflows/master.yml)
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=switcherapi_switcher-resolver-node&metric=alert_status)](https://sonarcloud.io/dashboard?id=switcherapi_switcher-resolver-node)
[![Known Vulnerabilities](https://snyk.io/test/github/switcherapi/switcher-resolver-node/badge.svg)](https://snyk.io/test/github/switcherapi/switcher-resolver-node)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![Slack: Switcher-HQ](https://img.shields.io/badge/slack-@switcher/hq-blue.svg?logo=slack)](https://switcher-hq.slack.com/)

Expand All @@ -18,7 +21,7 @@ Resolver Node for Component Switchers<br>

# About

**Switcher Resolver Node** is the Feature Flag resolver that runs the Switcher evaluation engine.
**Switcher Resolver Node** is the Feature Flag resolver that runs the Switcher evaluation criteria engine.

* * *

Expand All @@ -30,4 +33,4 @@ Resolver Node for Component Switchers<br>
# Quick start

Open Swagger UI by accessing the URL: http://localhost:3000/api-docs<br>
Or use Postman by importing either the OpenAPI json from http://localhost:3000/swagger.json or Postman Collection from "requests/Switcher API*"
Or use Postman by importing either the OpenAPI json from http://localhost:3000/swagger.json or Postman Collection from "requests/Switcher Resolver Node*"
39 changes: 39 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
version: '3.8'

networks:
backend:
driver: bridge

services:
switcher_resolver_node:
image: trackerforce/switcher-resolver-node
container_name: switcher-resolver-node
ports:
- 3001:3001
networks:
- backend
environment:
- NODE_ENV=development
- PORT=3001
- ENV=${ENV}
- SSL_KEY=${SSL_KEY}
- SSL_CERT=${SSL_CERT}

- MONGODB_URI=${MONGODB_URI}
- RESOURCE_SECRET=${RESOURCE_SECRET}
- JWT_SECRET=${JWT_SECRET}
- JWT_CLIENT_TOKEN_EXP_TIME=${JWT_CLIENT_TOKEN_EXP_TIME}
- RELAY_BYPASS_HTTPS=${RELAY_BYPASS_HTTPS}
- RELAY_BYPASS_VERIFICATION=${RELAY_BYPASS_VERIFICATION}
- METRICS_ACTIVATED=${METRICS_ACTIVATED}
- METRICS_MAX_PAGE=${METRICS_MAX_PAGE}
- REGEX_MAX_TIMEOUT=${REGEX_MAX_TIMEOUT}
- REGEX_MAX_BLACLIST=${REGEX_MAX_BLACLIST}
- MAX_REQUEST_PER_MINUTE=${MAX_REQUEST_PER_MINUTE}

- SWITCHER_API_LOGGER=${SWITCHER_API_LOGGER}
- SWITCHER_API_ENABLE=${SWITCHER_API_ENABLE}
- SWITCHER_API_URL=${SWITCHER_API_URL}
- SWITCHER_API_KEY=${SWITCHER_API_KEY}
- SWITCHER_API_DOMAIN=${SWITCHER_API_DOMAIN}
- SWITCHER_API_ENVIRONMENT=${SWITCHER_API_ENVIRONMENT}
19 changes: 10 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,41 +27,42 @@
],
"license": "MIT",
"dependencies": {
"axios": "^1.6.1",
"axios": "^1.6.2",
"bcryptjs": "^2.4.3",
"cors": "^2.8.5",
"express": "^4.18.2",
"express-basic-auth": "^1.2.1",
"express-rate-limit": "^7.1.4",
"express-validator": "^7.0.1",
"graphql": "^16.8.1",
"graphql-http": "^1.22.0",
"graphql-tag": "^2.12.6",
"helmet": "^7.0.0",
"helmet": "^7.1.0",
"jsonwebtoken": "^9.0.2",
"moment": "^2.29.4",
"mongodb": "^6.2.0",
"mongoose": "^8.0.0",
"pino": "^8.16.1",
"mongodb": "^6.3.0",
"mongoose": "^8.0.1",
"pino": "^8.16.2",
"pino-pretty": "^10.2.3",
"swagger-ui-express": "^5.0.0",
"switcher-client": "^3.2.0",
"validator": "^13.11.0"
},
"devDependencies": {
"@babel/cli": "^7.23.0",
"@babel/core": "^7.23.2",
"@babel/core": "^7.23.3",
"@babel/node": "^7.22.19",
"@babel/preset-env": "^7.23.2",
"@babel/preset-env": "^7.23.3",
"@babel/register": "^7.22.15",
"babel-jest": "^29.7.0",
"babel-polyfill": "^6.26.0",
"env-cmd": "^10.1.0",
"eslint": "^8.52.0",
"eslint": "^8.54.0",
"jest": "^29.7.0",
"jest-sonar-reporter": "^2.0.0",
"node-notifier": "^10.0.1",
"nodemon": "^3.0.1",
"sinon": "^17.0.0",
"sinon": "^17.0.1",
"supertest": "^6.3.3"
},
"repository": {
Expand Down
Loading