Skip to content

Repository files navigation

Scanerr Server (API repo)

Build Status

This is the server repo for the Scanerr API, an error detection service designed to run front-end tests on web-apps and sites. This service is fully dockertized for local dev/testing as well as deployed environments.

This software is only intended for internal white-label use and is not licensed for redristibution. See LICENSE for more information.

Copyright © Scanerr 2021


 

Table of Contents

 

Env's and deployment

 


 

Environment

Prior to running app, configure all env's located in the /env directory. There are example .env files for both production and local environments marked .env.dev.example and .env.prod.example. Prior to running the app, be sure to update with your unique keys, domains, passwords, etc, and remove the .example extention from the files. Never store actual .env's in a repo. Things to change:

  • high level django configs
  • admin credentials
  • email credentials
  • database configs
  • stripe keys
  • OAuth keys
  • twilio credentials
  • slack credentials
  • s3 remote storage credentials

 


 

Local

Install and run locally on your machine in a dev environment.

Ensure you have Docker and Docker-desktop installed and running on your machine prior to this step.

$ pip3 install virtualenv
$ virtualenv appenv
$ source appenv/bin/activate
$ mkdir app
$ git clone https://github.com/Scanerr-io/api-test.git

Spin-up the application

$ docker-compose up --build

Spin-down the application

$ docker-compose up down

 


 

Remote

Install and deploy remotely in a production environment.

Ensure you have Docker installed and running on your server prior to this step.

Server configurations for Ubuntu 20.04

$ ssh root@your_server_ip
# apt update
# apt upgrade
# adduser {user}
# usermod -aG sudo {user}
# ufw allow OpenSSH
# ufw enable
# su {user}

Create a dir to clone the app into

$ cd ~
$ mkdir app
$ cd app
$ git clone https://github.com/Scanerr-io/server.git

Spin-up the application

$ docker-compose -f docker-compose.prod.yml up -d --build

Spin-down the application

$ docker-compose -f docker-compose.prod.yml down

Spin-down the application and removes the volumes

$ docker-compose -f docker-compose.prod.yml down -v

 


 

Scripts

ssh into container

$ docker exec -it <container:id> /bin/sh

Releases

Packages

Contributors

Languages