Giter Club home page Giter Club logo

fifa_helper's Introduction

FIFA19 Helper

This application provides following functionalities:

  • Search players with given word that is found in name, nationality or club
  • Build a team with given budget

Requirements

  • Python 3.8+
  • Remote MySQL server
  • Docker

Usage (Docker)

CONTAINER_NAME can be determined using docker ps.

  1. Create .env file from .env-sample using your remote sql credentials.
  2. Run following command to build Docker image.
    docker build -t fifa_helper:latest .
  3. Run following command to start server.
    docker run --env-file=.env -p 8000:8000 fifa_helper
  4. Run following command to initialize db and create first players.
    docker exec -it $CONTAINER_NAME python player_creator.py

Running Tests

CONTAINER_NAME can be determined using docker ps.

  1. Use following command for coverage.
    docker exec -it $CONTAINER_NAME coverage run -m pytest
  2. Use following command to see report.
    docker exec -it $CONTAINER_NAME coverage report

Deploying the Application

  1. Get a Heroku account.
  2. Login to your account using the command below.
    heroku login
  3. Login to container service.
    heroku container:login
  4. Create a new space for your application with following:
    heroku create
  5. Build and push the docker image using command below.
    heroku container:push web
  6. Release the application using command below.
    heroku container:release web
  7. Set environment variables using following command:
    heroku config:set $(cat .env | sed '/^$/d; /#[[:print:]]*$/d')
  8. Start the application using the command below.
    heroku ps:scale web=1

Demo

You can test the application using this url.

fifa_helper's People

Contributors

bilbeyt 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.