Code Monkey home page Code Monkey logo

sportfolios-server's Introduction

SportFolios Server

This repository contains the code and configuration file to run the primary server. This consists of a machine, running four docker containers. They are

1. An NGINX web server and reverse proxy

This is the entry-point for all traffic hitting the server. It is optimised for speed and reliability. It runs on ports 80 (http) an 443 (SSL) with all un-encrypted http traffic being re-routed to the SSL port. All traffic is passed to the upstream flask server.

2. A Flask server, run with Gunicorn

This is where the primary server logic resides. Here is where we write all the back-end code. The process is run with Gunicorn, spawning a number of workers. There is also a sqlite database stored here, which logs all the server interactions.

3. A Redis server

This is where the flask server state is stored. This means market makers can be created quickly on the fly, and all flask processes will share the same state. It runs on default port 6379.

4. A certbot

This is a small process that regularly checks for SSL certificate expiry, and requests a new one via letsencrypt when necessary.

Files overview

- docker-compose.yml           # main docker-compose file
- init-letsencrypt.sh          # bash script to run on new server - sets up SSL certificates
redis
  - dump.rdb                   # the redis AOF backup file
  - redis-server.conf          # conf file for redis
  - logs.log                   # redis logfile
certbot
  conf                         # all SSL config files and folders
  www                          # not sure..  nothing?
nginx
  - app.conf                   # NGINX config file
flask
  serverenv                    # virtual environment. Only really used to create requirements.txt
  src                          # all server source files
  - dockerfile                 # dockerfile for flask container
  - requirements.txt           # python requirements. Gets run in dockerfile
  - database.db                # sqlite database
  - blah.json                  # firebase admin sdk config file

Please note that the Firebase admin key condiguration file is no longer usable.

sportfolios-server's People

Contributors

nickelnine37 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.