Skip to content

OfficeForProductSafetyAndStandards/antivirus

Repository files navigation

Antivirus server

This project contains the code for an antivirus API. Antivirus is used for Submit and Search cosmetic product notifications and Product safety database projects.

Tech Overview

The site is written in Ruby using Sinatra and uses the clamav to scan the files.

Running locally

  • Run docker build . from this directory.

Deployment

The service is deployed automatically when a pull request is opened (to the integration environment) and when merged (to production).

Deployment from scratch

Set the following environment variables:

cf set-env antivirus APP_ENV production

This will configure sinatra to run in production mode.

cf set-env antivirus ANTIVIRUS_USERNAME XXX
cf set-env antivirus ANTIVIRUS_PASSWORD XXX

This will set the Sentry configuration

cf set-env antivirus SENTRY_DSN XXX
cf set-env antivirus SENTRY_CURRENT_ENV <<SPACE>>

This will set HTTP basic auth for the health check.

Finally, create the following credentials for other applications to consume:

cf cups antivirus-auth-env -p '{
    "ANTIVIRUS_URL": "XXX",
    "ANTIVIRUS_USERNAME": "XXX",
    "ANTIVIRUS_PASSWORD": "XXX"
}'

About

Antivirus API used by Cosmetics and PSD apps

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published