Skip to content

Commit 5be4eef

Browse files
committed
django starter app using custom image with web app on linux
1 parent a53539b commit 5be4eef

File tree

133 files changed

+71115
-44
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

133 files changed

+71115
-44
lines changed

.gitignore

+217-44
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,218 @@
1+
## Ignore Visual Studio temporary files, build results, and
2+
## files generated by popular Visual Studio add-ons.
3+
4+
# User-specific files
5+
*.suo
6+
*.user
7+
*.userosscache
8+
*.sln.docstates
9+
10+
# User-specific files (MonoDevelop/Xamarin Studio)
11+
*.userprefs
12+
13+
# Build results
14+
[Dd]ebug/
15+
[Dd]ebugPublic/
16+
[Rr]elease/
17+
[Rr]eleases/
18+
x64/
19+
x86/
20+
build/
21+
bld/
22+
[Bb]in/
23+
[Oo]bj/
24+
25+
# Visual Studio 2015 cache/options directory
26+
.vs/
27+
28+
# MSTest test Results
29+
[Tt]est[Rr]esult*/
30+
[Bb]uild[Ll]og.*
31+
32+
# NUNIT
33+
*.VisualState.xml
34+
TestResult.xml
35+
36+
# Build Results of an ATL Project
37+
[Dd]ebugPS/
38+
[Rr]eleasePS/
39+
dlldata.c
40+
41+
# DNX
42+
project.lock.json
43+
artifacts/
44+
45+
*_i.c
46+
*_p.c
47+
*_i.h
48+
*.ilk
49+
*.meta
50+
*.obj
51+
*.pch
52+
*.pdb
53+
*.pgc
54+
*.pgd
55+
*.rsp
56+
*.sbr
57+
*.tlb
58+
*.tli
59+
*.tlh
60+
*.tmp
61+
*.tmp_proj
62+
*.log
63+
*.vspscc
64+
*.vssscc
65+
.builds
66+
*.pidb
67+
*.svclog
68+
*.scc
69+
70+
# Chutzpah Test files
71+
_Chutzpah*
72+
73+
# Visual C++ cache files
74+
ipch/
75+
*.aps
76+
*.ncb
77+
*.opensdf
78+
*.sdf
79+
*.cachefile
80+
81+
# Visual Studio profiler
82+
*.psess
83+
*.vsp
84+
*.vspx
85+
86+
# TFS 2012 Local Workspace
87+
$tf/
88+
89+
# Guidance Automation Toolkit
90+
*.gpState
91+
92+
# ReSharper is a .NET coding add-in
93+
_ReSharper*/
94+
*.[Rr]e[Ss]harper
95+
*.DotSettings.user
96+
97+
# JustCode is a .NET coding add-in
98+
.JustCode
99+
100+
# TeamCity is a build add-in
101+
_TeamCity*
102+
103+
# DotCover is a Code Coverage Tool
104+
*.dotCover
105+
106+
# NCrunch
107+
_NCrunch_*
108+
.*crunch*.local.xml
109+
110+
# MightyMoose
111+
*.mm.*
112+
AutoTest.Net/
113+
114+
# Web workbench (sass)
115+
.sass-cache/
116+
117+
# Installshield output folder
118+
[Ee]xpress/
119+
120+
# DocProject is a documentation generator add-in
121+
DocProject/buildhelp/
122+
DocProject/Help/*.HxT
123+
DocProject/Help/*.HxC
124+
DocProject/Help/*.hhc
125+
DocProject/Help/*.hhk
126+
DocProject/Help/*.hhp
127+
DocProject/Help/Html2
128+
DocProject/Help/html
129+
130+
# Click-Once directory
131+
publish/
132+
133+
# Publish Web Output
134+
*.[Pp]ublish.xml
135+
*.azurePubxml
136+
## TODO: Comment the next line if you want to checkin your
137+
## web deploy settings but do note that will include unencrypted
138+
## passwords
139+
#*.pubxml
140+
141+
*.publishproj
142+
143+
# NuGet Packages
144+
*.nupkg
145+
# The packages folder can be ignored because of Package Restore
146+
**/packages/*
147+
# except build/, which is used as an MSBuild target.
148+
!**/packages/build/
149+
# Uncomment if necessary however generally it will be regenerated when needed
150+
#!**/packages/repositories.config
151+
152+
# Windows Azure Build Output
153+
csx/
154+
*.build.csdef
155+
156+
# Windows Store app package directory
157+
AppPackages/
158+
159+
# Visual Studio cache files
160+
# files ending in .cache can be ignored
161+
*.[Cc]ache
162+
# but keep track of directories ending in .cache
163+
!*.[Cc]ache/
164+
165+
# Others
166+
ClientBin/
167+
[Ss]tyle[Cc]op.*
168+
~$*
169+
*~
170+
*.dbmdl
171+
*.dbproj.schemaview
172+
*.pfx
173+
*.publishsettings
174+
node_modules/
175+
orleans.codegen.cs
176+
*debug.config
177+
178+
# RIA/Silverlight projects
179+
Generated_Code/
180+
181+
# Backup & report files from converting an old project file
182+
# to a newer Visual Studio version. Backup files are not needed,
183+
# because we have git ;-)
184+
_UpgradeReport_Files/
185+
Backup*/
186+
UpgradeLog*.XML
187+
UpgradeLog*.htm
188+
189+
# SQL Server files
190+
*.mdf
191+
*.ldf
192+
193+
# Business Intelligence projects
194+
*.rdl.data
195+
*.bim.layout
196+
*.bim_*.settings
197+
198+
# Microsoft Fakes
199+
FakesAssemblies/
200+
201+
# Node.js Tools for Visual Studio
202+
.ntvs_analysis.dat
203+
204+
# Visual Studio 6 build log
205+
*.plg
206+
207+
# Visual Studio 6 workspace options file
208+
*.opt
209+
210+
# LightSwitch generated files
211+
GeneratedArtifacts/
212+
_Pvt_Extensions/
213+
ModelManifest.xml
214+
215+
1216
# Byte-compiled / optimized / DLL files
2217
__pycache__/
3218
*.py[cod]
@@ -20,7 +235,6 @@ lib64/
20235
parts/
21236
sdist/
22237
var/
23-
wheels/
24238
*.egg-info/
25239
.installed.cfg
26240
*.egg
@@ -43,7 +257,7 @@ htmlcov/
43257
.cache
44258
nosetests.xml
45259
coverage.xml
46-
*.cover
260+
*,cover
47261
.hypothesis/
48262

49263
# Translations
@@ -52,50 +266,9 @@ coverage.xml
52266

53267
# Django stuff:
54268
*.log
55-
local_settings.py
56-
57-
# Flask stuff:
58-
instance/
59-
.webassets-cache
60-
61-
# Scrapy stuff:
62-
.scrapy
63269

64270
# Sphinx documentation
65271
docs/_build/
66272

67273
# PyBuilder
68-
target/
69-
70-
# Jupyter Notebook
71-
.ipynb_checkpoints
72-
73-
# pyenv
74-
.python-version
75-
76-
# celery beat schedule file
77-
celerybeat-schedule
78-
79-
# SageMath parsed files
80-
*.sage.py
81-
82-
# dotenv
83-
.env
84-
85-
# virtualenv
86-
.venv
87-
venv/
88-
ENV/
89-
90-
# Spyder project settings
91-
.spyderproject
92-
.spyproject
93-
94-
# Rope project settings
95-
.ropeproject
96-
97-
# mkdocs documentation
98-
/site
99-
100-
# mypy
101-
.mypy_cache/
274+
target/

Dockerfile

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
2+
FROM python:3.4
3+
4+
RUN mkdir /code
5+
WORKDIR /code
6+
ADD requirements.txt /code/
7+
RUN pip install -r requirements.txt
8+
ADD . /code/
9+
# ssh
10+
ENV SSH_PASSWD "root:Docker!"
11+
RUN apt-get update \
12+
&& apt-get install -y --no-install-recommends openssh-server \
13+
&& echo "$SSH_PASSWD" | chpasswd
14+
15+
COPY sshd_config /etc/ssh/
16+
17+
EXPOSE 8000 2222
18+
CMD ["python", "/code/manage.py", "runserver", "0.0.0.0:8000"]

README.md

+9
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,13 @@
1+
# Django starter app for Web App on Linux
12

3+
A simple Python Django application running in a Docker container. The custom image uses port 8000.
4+
5+
## Setting up custom image for web App on Linux
6+
- Create a Web App on Linux using CLI or Azure portal
7+
- Configure your web app to custom image
8+
- Add an App Setting ```WEBSITE_PORT = 8000 ``` for your app
9+
- Browse your site
10+
-
211
# Contributing
312

413
This project welcomes contributions and suggestions. Most contributions require you to agree to a

app/__init__.py

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
"""
2+
Package for the application.
3+
"""

app/forms.py

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
"""
2+
Definition of forms.
3+
"""
4+
5+
from django import forms
6+
from django.contrib.auth.forms import AuthenticationForm

app/migrations/__init__.py

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+

app/models.py

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
"""
2+
Definition of models.
3+
"""
4+
5+
from django.db import models
6+
7+
# Create your models here.

0 commit comments

Comments
 (0)