Skip to content

Commit

Permalink
First commit
Browse files Browse the repository at this point in the history
  • Loading branch information
azuredevopsproject committed Jan 11, 2019
0 parents commit c673623
Show file tree
Hide file tree
Showing 38 changed files with 26,725 additions and 0 deletions.
10 changes: 10 additions & 0 deletions Application/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
FROM ubuntu:16.04
LABEL maintainer="Azure App Service Container Images <appsvc-images@microsoft.com>"
RUN apt-get update -y
RUN apt-get install -y python-pip python-dev build-essential
COPY . /app
WORKDIR /app
RUN pip install -r requirements.txt
ENTRYPOINT ["python"]
EXPOSE 5000
CMD ["runserver.py"]
21 changes: 21 additions & 0 deletions Application/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) Microsoft Corporation. All rights reserved.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE
17 changes: 17 additions & 0 deletions Application/Readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
| Language | Framework | Platform | Author |
| -------- | -------- |--------|--------|
| Python | Flask | Azure Web App, Virtual Machine| |


# Python Flask web application

Sample Python Flask web application built using Visual Studio 2017.

## License:

See [LICENSE](LICENSE).

## Contributing

This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.

111 changes: 111 additions & 0 deletions Application/python-webapp-flask.pyproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
<PropertyGroup>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>bc578bb7-484d-4022-8c3a-4d7f2aeb451d</ProjectGuid>
<ProjectHome>.</ProjectHome>
<ProjectTypeGuids>{789894c7-04a9-4a11-a6b5-3f4435165112};{1b580a1a-fdb3-4b32-83e1-6407eb2722e6};{349c5851-65df-11da-9384-00065b846f21};{888888a0-9f3d-457c-b088-3a5042f75d52}</ProjectTypeGuids>
<StartupFile>runserver.py</StartupFile>
<SearchPath>
</SearchPath>
<WorkingDirectory>.</WorkingDirectory>
<LaunchProvider>Web launcher</LaunchProvider>
<WebBrowserUrl>http://localhost</WebBrowserUrl>
<OutputPath>.</OutputPath>
<SuppressCollectPythonCloudServiceFiles>true</SuppressCollectPythonCloudServiceFiles>
<Name>python-webapp-flask</Name>
<RootNamespace>python-webapp-flask</RootNamespace>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
<DebugSymbols>true</DebugSymbols>
<EnableUnmanagedDebugging>false</EnableUnmanagedDebugging>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<DebugSymbols>true</DebugSymbols>
<EnableUnmanagedDebugging>false</EnableUnmanagedDebugging>
</PropertyGroup>
<ItemGroup>
<Compile Include="runserver.py" />
<Compile Include="python_webapp_flask\__init__.py" />
<Compile Include="python_webapp_flask\views.py" />
</ItemGroup>
<ItemGroup>
<Folder Include="python_webapp_flask\" />
<Folder Include="python_webapp_flask\static\" />
<Folder Include="python_webapp_flask\static\content\" />
<Folder Include="python_webapp_flask\static\fonts\" />
<Folder Include="python_webapp_flask\static\img\" />
<Folder Include="python_webapp_flask\static\scripts\" />
<Folder Include="python_webapp_flask\templates\" />
</ItemGroup>
<ItemGroup>
<Content Include="python_webapp_flask\static\fonts\segoeuil.ttf" />
<Content Include="python_webapp_flask\static\img\successCloudNew.svg" />
<Content Include="python_webapp_flask\static\img\tweetThis.svg" />
<Content Include="requirements.txt" />
<Content Include="python_webapp_flask\static\content\bootstrap.css" />
<Content Include="python_webapp_flask\static\content\bootstrap.min.css" />
<Content Include="python_webapp_flask\static\content\site.css" />
<Content Include="python_webapp_flask\static\scripts\bootstrap.js" />
<Content Include="python_webapp_flask\static\scripts\bootstrap.min.js" />
<Content Include="python_webapp_flask\static\scripts\jquery-1.10.2.intellisense.js" />
<Content Include="python_webapp_flask\static\scripts\jquery-1.10.2.js" />
<Content Include="python_webapp_flask\static\scripts\jquery-1.10.2.min.js" />
<Content Include="python_webapp_flask\static\scripts\jquery-1.10.2.min.map" />
<Content Include="python_webapp_flask\static\scripts\jquery.validate-vsdoc.js" />
<Content Include="python_webapp_flask\static\scripts\jquery.validate.js" />
<Content Include="python_webapp_flask\static\scripts\jquery.validate.min.js" />
<Content Include="python_webapp_flask\static\scripts\jquery.validate.unobtrusive.js" />
<Content Include="python_webapp_flask\static\scripts\jquery.validate.unobtrusive.min.js" />
<Content Include="python_webapp_flask\static\scripts\modernizr-2.6.2.js" />
<Content Include="python_webapp_flask\static\scripts\respond.js" />
<Content Include="python_webapp_flask\static\scripts\respond.min.js" />
<Content Include="python_webapp_flask\static\scripts\_references.js" />
<Content Include="python_webapp_flask\templates\about.html" />
<Content Include="python_webapp_flask\templates\contact.html" />
<Content Include="python_webapp_flask\templates\index.html" />
<Content Include="python_webapp_flask\templates\layout.html" />
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\Python Tools\Microsoft.PythonTools.Web.targets" />
<!-- Specify pre- and post-build commands in the BeforeBuild and
AfterBuild targets below. -->
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
<ProjectExtensions>
<VisualStudio>
<FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
<WebProjectProperties>
<AutoAssignPort>True</AutoAssignPort>
<UseCustomServer>True</UseCustomServer>
<CustomServerUrl>http://localhost</CustomServerUrl>
<SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile>
</WebProjectProperties>
</FlavorProperties>
<FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}" User="">
<WebProjectProperties>
<StartPageUrl>
</StartPageUrl>
<StartAction>CurrentPage</StartAction>
<AspNetDebugging>True</AspNetDebugging>
<SilverlightDebugging>False</SilverlightDebugging>
<NativeDebugging>False</NativeDebugging>
<SQLDebugging>False</SQLDebugging>
<ExternalProgram>
</ExternalProgram>
<StartExternalURL>
</StartExternalURL>
<StartCmdLineArguments>
</StartCmdLineArguments>
<StartWorkingDirectory>
</StartWorkingDirectory>
<EnableENC>False</EnableENC>
<AlwaysStartWebServerOnDebug>False</AlwaysStartWebServerOnDebug>
</WebProjectProperties>
</FlavorProperties>
</VisualStudio>
</ProjectExtensions>
</Project>
14 changes: 14 additions & 0 deletions Application/python_webapp_flask/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
"""
The flask application package.
"""

from flask import Flask
from os import environ
from applicationinsights.requests import WSGIApplication
app = Flask(__name__)
app.wsgi_app = WSGIApplication(environ.get('APPINSIGHTS_INSTRUMENTATIONKEY'), app.wsgi_app)
import python_webapp_flask.views




Loading

0 comments on commit c673623

Please sign in to comment.