-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 960f879
Showing
7 changed files
with
112 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
FROM python:3.6-slim | ||
WORKDIR /app | ||
COPY . /app | ||
RUN pip install --no-cache-dir -r requirements.txt | ||
EXPOSE 80 | ||
CMD ["python", "app.py"] |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
from flask import Flask, render_template | ||
from flask import jsonify | ||
|
||
|
||
app = Flask(__name__,static_url_path='/assets',static_folder='assets',template_folder='assets/templates') | ||
|
||
@app.route("/ping/") | ||
def ping(): | ||
data = {} | ||
data["text"]="pong" | ||
return jsonify(data),200 | ||
|
||
@app.route("/") | ||
def hello(): | ||
service = {} | ||
service["text"]="Hello, Racer!" | ||
return render_template("index.html", service=service) | ||
|
||
if __name__ == "__main__": | ||
app.run(debug=True, host='0.0.0.0', port=80) |
Large diffs are not rendered by default.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Large diffs are not rendered by default.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
<html> | ||
|
||
<head> | ||
<meta charset="UTF-8"> | ||
<title>Hello, Racer!</title> | ||
<link rel="stylesheet" href="./assets/css/bulma.min.css"> | ||
|
||
</head> | ||
<style> | ||
.bold{ | ||
font-weight: bold; | ||
} | ||
|
||
|
||
</style> | ||
<body class="background"> | ||
<h1></h1> | ||
<nav class="navbar" role="navigation" aria-label="main navigation" style="background-color:black;"> | ||
<div class="navbar-brand"> | ||
<a class="navbar-item" href="/"> | ||
<img src="./assets/images/AWS_logo_RGB_REV.png" alt="" > | ||
</a> | ||
|
||
<button class="button navbar-burger"> | ||
<span></span> | ||
<span></span> | ||
<span></span> | ||
</button> | ||
</div> | ||
</nav> | ||
|
||
<div id="screen1" class="container" style="margin-top:30px;"> | ||
|
||
<div class="columns"> | ||
<div class="column is-8"> | ||
<div class="columns"> | ||
<div class="column is-12 has-text-centered" style=""> | ||
<div class="title is-1">{{service.text}}</div> | ||
</div> | ||
</div> | ||
|
||
<div class="columns"> | ||
<div class="column is-12 has-text-centered" style=""> | ||
<figure class="image is-16by9"> | ||
<img src="/assets/images/ryan-spencer-762284-unsplash.jpg"> | ||
</figure> | ||
<small>Photo by Ryan Spencer on Unsplash</small> | ||
|
||
</div> | ||
</div> | ||
</div> | ||
<div class="column is-4"> | ||
<div class="title is-4">Attribution</div> | ||
<p> | ||
This demo is written in <a class="bold" target="_blank" href="https://www.python.org/download/releases/3.0/">Python 3</a> with <a class="bold" target="_blank" href="http://flask.pocoo.org/">Flask Microframework</a> and rendered using <a class="bold" target="_blank" href="http://jinja.pocoo.org/">Jinja template engine</a>. Photo is credited to <a class="bold" target="_blank" href="Photo by Ryan Spencer on Unsplash">Ryan Spencer</a> on <a class="bold" target="_blank" href="https://unsplash.com/search/photos/cafe-racer?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText">Unsplash</a>. All styling is done with help from <a class="bold" target="_blank" href="https://bulma.io/">Bulma</a>, an open source CSS Framework. This demo is deployed using <a class="bold" target="_blank" href="https://aws.amazon.com/fargate/">AWS Fargate</a>. | ||
</p> | ||
|
||
<p> | ||
This demo is created by <a class="bold" target="_blank" href="https://twitter.com/donnieprakoso/">Donnie Prakoso</a> and for full step-by-step walkthrough please refer to the blog post at <a class="bold" target="_blank" href="https://donnie.id/">https://donnie.id</a>. | ||
</p> | ||
|
||
</div> | ||
</div> | ||
|
||
|
||
|
||
|
||
|
||
|
||
</div> | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
</body> | ||
|
||
</html> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Flask |