Coder Social home page Coder Social logo

football's Introduction

Instalação

Football Championship is a proof of concept using Flask as backend and Vue as frontend (https://github.com/rogeriosantosluz/football-vue)

  • python3 -m pip install --upgrade pip

  • python3 -m venv env (PS> virtualenv env)

  • source env/bin/activate (PS> .\env\Scripts\activate.bat)

  • pip3 install -r requirements.txt

  • export set FLASK_APP=football.webapp (PS> $env:FLASK_APP="football.webapp")

  • export FLASK_ENV=development (default é production)

  • python3 -m flask run --host=0.0.0.0 (PS> flask run)

  • Criar o arquivo .env na raiz (/Users/rogerioluz/Documents/football) com as seguintes informações:

    • SECRET_KEY = b'sua chave secreta'
    • ADMIN_USERNAME = 'Seu usuario administrador'
    • ADMIN_PASSWORD = 'Uma senha'

https://flask.palletsprojects.com/en/1.1.x/cli/

Directories are scanned upwards from the directory you call flask from to locate the files. The current working directory will be set to the location of the file, with the assumption that that is the top level project directory.

WSGI

/etc/systemd/system/football.service

[Unit] Description=uWSGI instance to serv football After=network.target

[Service] User=root Group=root WorkingDirectory=/opt/football Environment="PATH=/opt/football/env/bin" ExecStart=/opt/football/env/bin/uwsgi --ini wsgi.ini

[Install] WantedBy=multi-user.target

stop start status

root@lab-morphine:/opt/football# systemctl start football root@lab-morphine:/opt/football# systemctl stop football root@lab-morphine:/opt/football# systemctl status football

https://www.digitalocean.com/community/tutorials/how-to-serve-flask-applications-with-uswgi-and-nginx-on-ubuntu-18-04

NGINX

https://www.digitalocean.com/community/tutorials/how-to-install-nginx-on-ubuntu-18-04

football's People

Watchers

Rogério Luz 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.