This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from python:alpine | |
RUN pip install -U pip && pip install flask | |
WORKDIR /code | |
COPY ./app.py /code | |
COPY ./index.html /code | |
CMD flask run -h 0.0.0.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from flask import Flask,Response | |
app = Flask(__name__) | |
@app.route('/') | |
def hello(): | |
return "Hello World!" | |
@app.route('/<int:recipe_id>',methods=['GET']) | |
def home(recipe_id): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# move this file to sites-available/ | |
server { | |
listen 443 ssl; | |
client_max_body_size 32M; | |
# set the correct host(s) for your site | |
server_name example.com; | |
keepalive_timeout 5; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# iptables script generated - | |
# http://www.mista.nu/iptables | |
IPT="/sbin/iptables" | |
# Flush old rules, old custom tables | |
$IPT --flush | |
$IPT --delete-chain |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# models.py | |
# | |
class Claim(models.Model): | |
week_commencing = models.DateField() | |
tech = models.ForeignKey( | |
settings.AUTH_USER_MODEL, |
NewerOlder