Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ec2b0d9

Browse files
committed
new pipelines
1 parent bf37f05 commit ec2b0d9

File tree

5 files changed

+54
-122
lines changed

5 files changed

+54
-122
lines changed

.dockerignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
.git
22
*.pyc
3-
__pycache__
3+
__pycache__
4+
infra/bicep
5+
infra/*.json

.github/workflows/build-deploy-aks.yml

Lines changed: 0 additions & 80 deletions
This file was deleted.

.vscode/settings.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
22
"python.linting.pylintEnabled": false,
3-
"python.pythonPath": ".venv/bin/python"
3+
"python.pythonPath": ".venv/bin/python",
4+
"editor.semanticHighlighting.enabled": true
45
}

README.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,25 +15,27 @@ Simply run with `python run.py` the script should start the app, and set Flask l
1515
Go to `http://localhost:5000` to view the app.
1616

1717
## Running as Docker Container
18-
The image is publicly available on [Dockerhub here](https://hub.docker.com/r/bencuk/python-demoapp/) so running it in Docker is simple `docker run -d -p 5000:5000 bencuk/python-demoapp`
18+
The image is publicly available on [GitHub Container Registry](https://hub.docker.com/r/bencuk/python-demoapp/) so running it in Docker is simple `docker run --rm -it -p 5000:5000 ghcr.io/benc-uk/python-demoapp`
1919

2020
The container runs on Debian Linux and is configured to use the latest version of Python (3.6.2 at the time of writing)
2121

22-
If you want to deploy to an Azure Container Instance, a working template & quick deploy button is provided in the [azure deploy directory](azure-deploy/)
23-
2422

2523
# GitHub Actions CI/CD
26-
A working CI and release GitHub Actions workflow is provided `.github/workflows/build-deploy-aks.yml`, automated builds are run in GitHub hosted runners
24+
A working set of CI and CD release GitHub Actions workflows are provided `.github/workflows/`, automated builds are run in GitHub hosted runners
2725

2826
### [GitHub Actions](https://github.com/benc-uk/python-demoapp/actions)
2927

30-
![](https://img.shields.io/github/workflow/status/benc-uk/python-demoapp/Build%20%26%20Deploy%20AKS)
31-
![](https://img.shields.io/github/last-commit/benc-uk/python-demoapp)
28+
![](https://img.shields.io/github/workflow/status/benc-uk/python-demoapp/CI%20Build%20App)
29+
30+
![](https://img.shields.io/github/workflow/status/benc-uk/python-demoapp/CD%20Release%20-%20AKS?label=release-kubernetes)
3231

32+
![](https://img.shields.io/github/workflow/status/benc-uk/python-demoapp/CD%20Release%20-%20Webapp?label=release-azure)
33+
34+
![](https://img.shields.io/github/last-commit/benc-uk/python-demoapp)
3335

3436
## Running in Azure App Service (Linux)
3537

36-
If you want to deploy to an Azure Web App for Containers (aka Linux Web App), a template is provided in the [azure deploy directory](azure-deploy/)
38+
If you want to deploy to an Azure Web App as a container (aka Linux Web App), a Bicep template is provided in the [infrastructure as code](infra/) directory
3739

3840
## Running in Azure App Service (Windows)
3941
Just don't

app/templates/base.html

Lines changed: 40 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,46 @@
11
<!DOCTYPE html>
22
<html>
3-
<head>
4-
<title>{% block title %}Python DemoApp{% endblock %}</title>
5-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
6-
<link href="/static/css/main.css" rel="stylesheet"/>
7-
<link href="/static/img/favicon.ico" rel="icon"/>
8-
<link href="https://maxcdn.bootstrapcdn.com/bootswatch/3.3.7/united/bootstrap.min.css" rel="stylesheet">
9-
</head>
10-
<body>
113

12-
<nav class="navbar navbar-default navbar-fixed-top">
13-
<div class="container-fluid">
14-
<div class="navbar-header">
15-
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target=".navbar-collapse">
16-
<span class="sr-only">Toggle navigation</span>
17-
<span class="icon-bar"></span>
18-
<span class="icon-bar"></span>
19-
<span class="icon-bar"></span>
20-
</button>
21-
<a class="navbar-brand" href="/">Python Demo App</a>
22-
</div>
23-
24-
<div class="navbar-collapse collapse">
25-
<ul class="nav navbar-nav">
26-
<li><a href="/info"><span class="glyphicon glyphicon-eye-open" aria-hidden="true"></span>&nbsp; Sys Info</a></li>
27-
<li><a href="/monitor"><span class="glyphicon glyphicon-dashboard" aria-hidden="true"></span>&nbsp; Realtime Monitor</a></li>
28-
</ul>
29-
</div>
30-
</div>
31-
</nav>
4+
<head>
5+
<title>{% block title %}Python DemoApp{% endblock %}</title>
6+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
7+
<link href="/static/css/main.css" rel="stylesheet" />
8+
<link href="/static/img/favicon.ico" rel="icon" />
9+
<link href="https://maxcdn.bootstrapcdn.com/bootswatch/3.3.7/united/bootstrap.min.css" rel="stylesheet">
10+
</head>
3211

33-
<script src="https://code.jquery.com/jquery-1.10.2.min.js"></script>
34-
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
12+
<body>
13+
14+
<nav class="navbar navbar-default navbar-fixed-top">
15+
<div class="container-fluid">
16+
<div class="navbar-header">
17+
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target=".navbar-collapse">
18+
<span class="sr-only">Toggle navigation</span>
19+
<span class="icon-bar"></span>
20+
<span class="icon-bar"></span>
21+
<span class="icon-bar"></span>
22+
</button>
23+
<a class="navbar-brand" href="/">Python Demo App</a>
24+
</div>
25+
26+
<div class="navbar-collapse collapse">
27+
<ul class="nav navbar-nav">
28+
<li><a href="/info"><span class="glyphicon glyphicon-eye-open" aria-hidden="true"></span>&nbsp; Sys Info</a>
29+
</li>
30+
<li><a href="/monitor"><span class="glyphicon glyphicon-dashboard" aria-hidden="true"></span>&nbsp; Realtime
31+
Monitor</a></li>
32+
</ul>
33+
</div>
34+
</div>
35+
</nav>
36+
37+
<script src="https://code.jquery.com/jquery-1.10.2.min.js"></script>
38+
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"
39+
integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa"
40+
crossorigin="anonymous"></script>
41+
42+
<div class="container body-content">{% block content %}{% endblock %}</div>
43+
<span style="float:right">v1.3.0 [Ben Coleman, 2018-2020] &nbsp;&nbsp;&nbsp;</span>
44+
</body>
3545

36-
<div class="container body-content">{% block content %}{% endblock %}</div>
37-
<span style="float:right">v1.2.2 [Ben Coleman, 2018] &nbsp;&nbsp;&nbsp;</span>
38-
</body>
3946
</html>

0 commit comments

Comments
 (0)