Skip to content

Commit

Permalink
Update codebase to BSAWF v2
Browse files Browse the repository at this point in the history
  • Loading branch information
nickjj committed Jun 5, 2016
1 parent 6e95c73 commit a239036
Show file tree
Hide file tree
Showing 252 changed files with 1,282 additions and 11,934 deletions.
3 changes: 0 additions & 3 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,2 @@
.git
.idea
tmp/*
log/*
.dockerignore
1 change: 1 addition & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
COMPOSE_PROJECT_NAME=snakeeyes
19 changes: 2 additions & 17 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ __pycache__/
# Distribution / packaging
node_modules/
bin/
build/manifest.json
develop-eggs/
dist/
eggs/
parts/
sdist/
var/
npm-debug.log
*.egg-info/
.installed.cfg
*.egg

Expand Down Expand Up @@ -48,20 +48,5 @@ docs/_build/
tmtags

# App ignores.
build/manifest.json
build/public/*
!build/public/robots.txt
!build/public/404.html
!build/public/500.html
!build/public/502.html
!build/public/apple-touch-icon.png
!build/public/chrome-touch-icon-192x192.png
!build/public/favicon.ico
!build/public/icon-128x128.png
!build/public/ms-touch-icon-144x144-precomposed.png


celerybeat*
instance/settings.py
celerybeat.pid
celerybeat-schedule
core
12 changes: 0 additions & 12 deletions .travis.yml

This file was deleted.

3 changes: 0 additions & 3 deletions .virtualenv-bash

This file was deleted.

83 changes: 0 additions & 83 deletions CHANGES.rst

This file was deleted.

27 changes: 3 additions & 24 deletions Dockerfile
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,36 +1,15 @@
# Use the barebones version of Python 2.7.10.
FROM python:2.7.10-slim
FROM python:2.7-alpine
MAINTAINER Nick Janetakis <nick.janetakis@gmail.com>

# Install any packages that must be installed.
RUN apt-get update && apt-get install -qq -y build-essential nodejs nodejs-legacy npm libpq-dev postgresql-client-9.4 libpng-dev --fix-missing --no-install-recommends

# Setup the install path for this service.
ENV INSTALL_PATH /catwatch
ENV INSTALL_PATH /snakeeyes
RUN mkdir -p $INSTALL_PATH

# Update the workdir to be where our app is installed.
WORKDIR $INSTALL_PATH

# Ensure packages are cached and only get updated when necessary.
COPY requirements.txt requirements.txt
RUN pip install -r requirements.txt

# Ensure frontend packages are cached and only get updated when necessary.
COPY package.json package.json
RUN npm install

# Copy the source from the build machine to the image at the WORKDIR path.
COPY . .

# Process all of the assets.
RUN PUBLIC_PATH='/' NODE_ENV='production' npm run-script build

# Give access to the CLI script.
RUN pip install --editable .

# Create a volume so that nginx can read from it.
VOLUME ["$INSTALL_PATH/build/public"]

# The default command to run if no command is specified.
CMD gunicorn -b 0.0.0.0:8000 "catwatch.app:create_app()"
CMD gunicorn -b 0.0.0.0:8000 --access-logfile - "snakeeyes.app:create_app()"
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2015 Nick Janetakis <nick.janetakis@gmail.com>
Copyright (c) 2016 Nick Janetakis <nick.janetakis@gmail.com>

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
Expand Down
6 changes: 0 additions & 6 deletions Procfile

This file was deleted.

56 changes: 56 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
## Welcome to The Build a SAAS App with Flask Course

*Learn how to build a production ready web app with Flask and Docker. Level up
and win that dream software developer job.*

**Full details on the course can be found here:**
http://nickjanetakis.com/courses/build-a-saas-app-with-flask

Free sample videos **(including what we'll build)** can be found here:
http://nickjanetakis.com/blog/build-a-saas-app-with-flask-free-sample-videos

### How does this source code differ than what's in the course?

In the course we build up a 4,000+ line Flask application in 15 stages while I'm
at your side explaining my thought process along the way.

You will get to see the source code grow from a single `app.py` file to a large
code base that spans across dozens of files and folders.

This repo includes up to the 6th stage. By this point in the code base, you'll
be introduced to concepts such as:

- Using Docker to "Dockerize" a multi-service Flask app
- Using Flask extensions
- Flask blueprints
- Jinja templates
- Working with forms
- Sending e-mails through Celery
- Creating Click based CLI scripts
- Testing and analyzing your code base

The rest of the course covers topics such as:

- What is Docker and how can you use it?
- Going over the application's architecture and tech choices
- Creating a full blown user management system
- Creating a custom admin dashboard
- Logging, middleware and error handling
- Adding quality of life improvements to the CLI script
- Accepting recurring credit card payments with Stripe
- Building up a dice game called "Snake Eyes"
- Responding with JSON from Flask and creating AJAX requests
- Processing microtransaction payments with Stripe
- Dealing with database migrations
- Converting your app to support multiple languages (i18n)

**By the time you finish my course, you'll have all the confidence you need to
build a large web application with Flask**.

---

There's over 150 video lectures, 9.5 hours of content, coding exercises and an
e-book that's included.

**Everything you'd want to know about the course can be found here:**
http://nickjanetakis.com/courses/build-a-saas-app-with-flask
Loading

0 comments on commit a239036

Please sign in to comment.