diff --git a/Dockerfile b/Dockerfile index 8b13789..c709a34 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1 +1,14 @@ +FROM python:3.7-alpine +WORKDIR /src/app/ + +COPY ./requirements.txt . + +RUN ["pip", "install", "-r", "./requirements.txt"] + +COPY . . + +RUN addgroup -S projects && adduser -S -H projects -G projects +RUN chown -R projects:projects /src/app + +USER projects diff --git a/blogproj/blogproj/__init__.py b/blogproj/__init__.py similarity index 100% rename from blogproj/blogproj/__init__.py rename to blogproj/__init__.py diff --git a/blogproj/blogproj/settings.py b/blogproj/settings.py similarity index 95% rename from blogproj/blogproj/settings.py rename to blogproj/settings.py index ce1ec05..8ee8136 100644 --- a/blogproj/blogproj/settings.py +++ b/blogproj/settings.py @@ -15,6 +15,9 @@ # Build paths inside the project like this: os.path.join(BASE_DIR, ...) BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) +TEST_RUNNER = 'xmlrunner.extra.djangotestrunner.XMLTestRunner' +TEST_OUTPUT_DIR = BASE_DIR +TEST_OUTPUT_FILE_NAME = '.report.xml' # Quick-start development settings - unsuitable for production # See https://docs.djangoproject.com/en/2.2/howto/deployment/checklist/ @@ -128,4 +131,4 @@ LOGIN_URL = 'login' LOGIN_REDIRECT_URL = 'index' -AUTH_USER_MODEL = 'users.User' \ No newline at end of file +AUTH_USER_MODEL = 'users.User' diff --git a/blogproj/blogproj/urls.py b/blogproj/urls.py similarity index 100% rename from blogproj/blogproj/urls.py rename to blogproj/urls.py diff --git a/blogproj/blogproj/views.py b/blogproj/views.py similarity index 100% rename from blogproj/blogproj/views.py rename to blogproj/views.py diff --git a/blogproj/blogproj/wsgi.py b/blogproj/wsgi.py similarity index 100% rename from blogproj/blogproj/wsgi.py rename to blogproj/wsgi.py diff --git a/blogproj/mainapp/__init__.py b/mainapp/__init__.py similarity index 100% rename from blogproj/mainapp/__init__.py rename to mainapp/__init__.py diff --git a/blogproj/mainapp/admin.py b/mainapp/admin.py similarity index 100% rename from blogproj/mainapp/admin.py rename to mainapp/admin.py diff --git a/blogproj/mainapp/apps.py b/mainapp/apps.py similarity index 100% rename from blogproj/mainapp/apps.py rename to mainapp/apps.py diff --git a/blogproj/mainapp/migrations/0001_initial.py b/mainapp/migrations/0001_initial.py similarity index 100% rename from blogproj/mainapp/migrations/0001_initial.py rename to mainapp/migrations/0001_initial.py diff --git a/blogproj/mainapp/migrations/0002_auto_20191004_0501.py b/mainapp/migrations/0002_auto_20191004_0501.py similarity index 100% rename from blogproj/mainapp/migrations/0002_auto_20191004_0501.py rename to mainapp/migrations/0002_auto_20191004_0501.py diff --git a/blogproj/mainapp/migrations/__init__.py b/mainapp/migrations/__init__.py similarity index 100% rename from blogproj/mainapp/migrations/__init__.py rename to mainapp/migrations/__init__.py diff --git a/blogproj/mainapp/models.py b/mainapp/models.py similarity index 100% rename from blogproj/mainapp/models.py rename to mainapp/models.py diff --git a/blogproj/mainapp/templates/mainapp/filtered_post_list.html b/mainapp/templates/mainapp/filtered_post_list.html similarity index 100% rename from blogproj/mainapp/templates/mainapp/filtered_post_list.html rename to mainapp/templates/mainapp/filtered_post_list.html diff --git a/blogproj/mainapp/templates/mainapp/index.html b/mainapp/templates/mainapp/index.html similarity index 100% rename from blogproj/mainapp/templates/mainapp/index.html rename to mainapp/templates/mainapp/index.html diff --git a/blogproj/mainapp/templates/mainapp/post.html b/mainapp/templates/mainapp/post.html similarity index 100% rename from blogproj/mainapp/templates/mainapp/post.html rename to mainapp/templates/mainapp/post.html diff --git a/blogproj/mainapp/templates/mainapp/snippet_post_link.html b/mainapp/templates/mainapp/snippet_post_link.html similarity index 100% rename from blogproj/mainapp/templates/mainapp/snippet_post_link.html rename to mainapp/templates/mainapp/snippet_post_link.html diff --git a/blogproj/mainapp/templates/mainapp/snippet_tag_labels.html b/mainapp/templates/mainapp/snippet_tag_labels.html similarity index 100% rename from blogproj/mainapp/templates/mainapp/snippet_tag_labels.html rename to mainapp/templates/mainapp/snippet_tag_labels.html diff --git a/blogproj/mainapp/tests.py b/mainapp/tests.py similarity index 100% rename from blogproj/mainapp/tests.py rename to mainapp/tests.py diff --git a/blogproj/mainapp/urls.py b/mainapp/urls.py similarity index 100% rename from blogproj/mainapp/urls.py rename to mainapp/urls.py diff --git a/blogproj/mainapp/views.py b/mainapp/views.py similarity index 100% rename from blogproj/mainapp/views.py rename to mainapp/views.py diff --git a/blogproj/manage.py b/manage.py similarity index 100% rename from blogproj/manage.py rename to manage.py diff --git a/blogproj/module1/tests.py b/module1/tests.py similarity index 100% rename from blogproj/module1/tests.py rename to module1/tests.py diff --git a/requirements.txt b/requirements.txt index 4c2e358..9d77c28 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,5 @@ Django==2.2.5 pytz==2019.2 +six==1.13.0 sqlparse==0.3.0 +unittest-xml-reporting==2.5.2 diff --git a/blogproj/static/apple-touch-icon.png b/static/apple-touch-icon.png similarity index 100% rename from blogproj/static/apple-touch-icon.png rename to static/apple-touch-icon.png diff --git a/blogproj/static/browserconfig.xml b/static/browserconfig.xml similarity index 100% rename from blogproj/static/browserconfig.xml rename to static/browserconfig.xml diff --git a/blogproj/static/css/main.css b/static/css/main.css similarity index 100% rename from blogproj/static/css/main.css rename to static/css/main.css diff --git a/blogproj/static/favicon.ico b/static/favicon.ico similarity index 100% rename from blogproj/static/favicon.ico rename to static/favicon.ico diff --git a/blogproj/static/fonts/GothamBold.ttf b/static/fonts/GothamBold.ttf similarity index 100% rename from blogproj/static/fonts/GothamBold.ttf rename to static/fonts/GothamBold.ttf diff --git a/blogproj/static/fonts/GothamBook.ttf b/static/fonts/GothamBook.ttf similarity index 100% rename from blogproj/static/fonts/GothamBook.ttf rename to static/fonts/GothamBook.ttf diff --git a/blogproj/static/fonts/GothamMedium.ttf b/static/fonts/GothamMedium.ttf similarity index 100% rename from blogproj/static/fonts/GothamMedium.ttf rename to static/fonts/GothamMedium.ttf diff --git a/blogproj/static/fonts/glyphicons-halflings-regular.eot b/static/fonts/glyphicons-halflings-regular.eot similarity index 100% rename from blogproj/static/fonts/glyphicons-halflings-regular.eot rename to static/fonts/glyphicons-halflings-regular.eot diff --git a/blogproj/static/fonts/glyphicons-halflings-regular.svg b/static/fonts/glyphicons-halflings-regular.svg similarity index 100% rename from blogproj/static/fonts/glyphicons-halflings-regular.svg rename to static/fonts/glyphicons-halflings-regular.svg diff --git a/blogproj/static/fonts/glyphicons-halflings-regular.ttf b/static/fonts/glyphicons-halflings-regular.ttf similarity index 100% rename from blogproj/static/fonts/glyphicons-halflings-regular.ttf rename to static/fonts/glyphicons-halflings-regular.ttf diff --git a/blogproj/static/fonts/glyphicons-halflings-regular.woff b/static/fonts/glyphicons-halflings-regular.woff similarity index 100% rename from blogproj/static/fonts/glyphicons-halflings-regular.woff rename to static/fonts/glyphicons-halflings-regular.woff diff --git a/blogproj/static/index.html b/static/index.html similarity index 100% rename from blogproj/static/index.html rename to static/index.html diff --git a/blogproj/static/js/main.js b/static/js/main.js similarity index 100% rename from blogproj/static/js/main.js rename to static/js/main.js diff --git a/blogproj/static/js/vendor/modernizr-2.8.3-respond-1.4.2.min.js b/static/js/vendor/modernizr-2.8.3-respond-1.4.2.min.js similarity index 100% rename from blogproj/static/js/vendor/modernizr-2.8.3-respond-1.4.2.min.js rename to static/js/vendor/modernizr-2.8.3-respond-1.4.2.min.js diff --git a/blogproj/static/js/vendor/npm.js b/static/js/vendor/npm.js similarity index 100% rename from blogproj/static/js/vendor/npm.js rename to static/js/vendor/npm.js diff --git a/blogproj/static/tile-wide.png b/static/tile-wide.png similarity index 100% rename from blogproj/static/tile-wide.png rename to static/tile-wide.png diff --git a/blogproj/static/tile.png b/static/tile.png similarity index 100% rename from blogproj/static/tile.png rename to static/tile.png diff --git a/blogproj/templates/base.html b/templates/base.html similarity index 100% rename from blogproj/templates/base.html rename to templates/base.html diff --git a/blogproj/users/__init__.py b/users/__init__.py similarity index 100% rename from blogproj/users/__init__.py rename to users/__init__.py diff --git a/blogproj/users/admin.py b/users/admin.py similarity index 100% rename from blogproj/users/admin.py rename to users/admin.py diff --git a/blogproj/users/apps.py b/users/apps.py similarity index 100% rename from blogproj/users/apps.py rename to users/apps.py diff --git a/blogproj/users/forms.py b/users/forms.py similarity index 100% rename from blogproj/users/forms.py rename to users/forms.py diff --git a/blogproj/users/migrations/0001_initial.py b/users/migrations/0001_initial.py similarity index 100% rename from blogproj/users/migrations/0001_initial.py rename to users/migrations/0001_initial.py diff --git a/blogproj/users/migrations/__init__.py b/users/migrations/__init__.py similarity index 100% rename from blogproj/users/migrations/__init__.py rename to users/migrations/__init__.py diff --git a/blogproj/users/models.py b/users/models.py similarity index 100% rename from blogproj/users/models.py rename to users/models.py diff --git a/blogproj/users/templates/registration/login.html b/users/templates/registration/login.html similarity index 100% rename from blogproj/users/templates/registration/login.html rename to users/templates/registration/login.html diff --git a/blogproj/users/templates/registration/register.html b/users/templates/registration/register.html similarity index 100% rename from blogproj/users/templates/registration/register.html rename to users/templates/registration/register.html diff --git a/blogproj/users/tests.py b/users/tests.py similarity index 100% rename from blogproj/users/tests.py rename to users/tests.py diff --git a/blogproj/users/urls.py b/users/urls.py similarity index 100% rename from blogproj/users/urls.py rename to users/urls.py diff --git a/blogproj/users/views.py b/users/views.py similarity index 100% rename from blogproj/users/views.py rename to users/views.py