Skip to content

Commit

Permalink
Prepare for a cookie cutter as possible (#3)
Browse files Browse the repository at this point in the history
* deployment stubs

* title update on index

* Update README.md
  • Loading branch information
kmanc authored Oct 17, 2021
1 parent 8327579 commit 248d5fb
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 0 deletions.
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
# fantasy_football_records

[We're live!!](https://walpolefantasyfootball.com/)

### Setup

- [Namecheap domain to Digital Ocean](https://www.namecheap.com/support/knowledgebase/article.aspx/10375/2208/how-do-i-link-a-domain-to-my-digitalocean-account/)
- [Digital Ocean starter guide](https://www.digitalocean.com/community/tutorials/initial-server-setup-with-ubuntu-18-04)
- [Digital Ocean flask + nginx](https://www.digitalocean.com/community/tutorials/how-to-serve-flask-applications-with-uswgi-and-nginx-on-ubuntu-18-04#step-7-%E2%80%94-securing-the-application)
- [Let's Encrypt nginx + ubuntu](https://certbot.eff.org/lets-encrypt/ubuntufocal-nginx)

### Notes

Get access to private leagues that you are a member of with the instructions on [cwendt94's awesome ESPN API repo](https://github.com/cwendt94/espn-api)
5 changes: 5 additions & 0 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
@app.route("/")
def index():
return render_template('index.html',
title_prefix=league_abbreviation,
record_name="Home",
welcome_message=f"Welcome to the {league_name} online record book")


Expand Down Expand Up @@ -126,4 +128,7 @@ def highest_losses():


if __name__ == "__main__":
# For testing
app.run(debug=True)
# For real
#app.run(host="0.0.0.0")
8 changes: 8 additions & 0 deletions fantasy_football_records.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[uwsgi]
module = wsgi:app
master = true
processes = 5
socket = fantasy_football_records.sock
chmod-socket = 660
vacuum = true
die-on-term = true
4 changes: 4 additions & 0 deletions wsgi.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
from app import app

if __name__ == "__main__":
app.run()

0 comments on commit 248d5fb

Please sign in to comment.