[copr] bkabrda-workspace: Get rid of the OpenShift stuff, rename the containing dir to coprs_frontend, include sample apache config file (7632011)

bkabrda at fedoraproject.org bkabrda at fedoraproject.org
Tue Nov 27 12:23:02 UTC 2012


Repository : http://git.fedorahosted.org/cgit/copr.git

On branch  : bkabrda-workspace

>---------------------------------------------------------------

commit 7632011f74598fcbdf43365461589d5161583c48
Author: Bohuslav Kabrda <bkabrda at redhat.com>
Date:   Tue Nov 27 13:22:49 2012 +0100

    Get rid of the OpenShift stuff, rename the containing dir to coprs_frontend, include sample apache config file


>---------------------------------------------------------------

 {wsgi => coprs_frontend}/TODO                      |    0
 {wsgi => coprs_frontend}/alembic.ini               |    0
 {wsgi => coprs_frontend}/alembic/env.py            |    0
 {wsgi => coprs_frontend}/alembic/script.py.mako    |    0
 .../versions/595a31c145fb_initial_db_setup.py      |    0
 coprs_frontend/application                         |   12 ++++++++++++
 coprs_frontend/coprs.conf.example                  |   16 ++++++++++++++++
 {wsgi => coprs_frontend}/coprs/__init__.py         |    0
 {wsgi => coprs_frontend}/coprs/config.py           |   15 ++++-----------
 {wsgi => coprs_frontend}/coprs/constants.py        |    0
 {wsgi => coprs_frontend}/coprs/exceptions.py       |    0
 {wsgi => coprs_frontend}/coprs/filters.py          |    0
 {wsgi => coprs_frontend}/coprs/forms.py            |    0
 {wsgi => coprs_frontend}/coprs/helpers.py          |    0
 .../coprs/logic/.coprs_logic.py.swo                |  Bin 12288 -> 12288 bytes
 {wsgi => coprs_frontend}/coprs/logic/__init__.py   |    0
 .../coprs/logic/builds_logic.py                    |    0
 .../coprs/logic/coprs_logic.py                     |    0
 {wsgi => coprs_frontend}/coprs/models.py           |    0
 {wsgi => coprs_frontend}/coprs/static/README       |    0
 {wsgi => coprs_frontend}/coprs/static/style.css    |    0
 {wsgi => coprs_frontend}/coprs/templates/404.html  |    0
 .../coprs/templates/_helpers.html                  |    0
 .../coprs/templates/coprs/_builds_table.html       |    0
 .../coprs/templates/coprs/_coprs_forms.html        |    0
 .../coprs/templates/coprs/_permissions_table.html  |    0
 .../coprs/templates/coprs/add.html                 |    0
 .../coprs/templates/coprs/detail.html              |    0
 .../coprs/templates/coprs/edit.html                |    0
 .../coprs/templates/coprs/show.html                |    0
 .../coprs/templates/coprs/show_builds.html         |    0
 .../coprs/templates/layout.html                    |    0
 .../coprs/templates/login.html                     |    0
 {wsgi => coprs_frontend}/coprs/views/__init__.py   |    0
 .../coprs/views/backend_ns/__init__.py             |    0
 .../coprs/views/backend_ns/backend_general.py      |    0
 .../coprs/views/coprs_ns/__init__.py               |    0
 .../coprs/views/coprs_ns/coprs_builds.py           |    0
 .../coprs/views/coprs_ns/coprs_general.py          |    0
 {wsgi => coprs_frontend}/coprs/views/misc.py       |    0
 {wsgi => coprs_frontend}/manage.py                 |    0
 {wsgi => coprs_frontend}/runapp.py                 |    0
 {wsgi => coprs_frontend}/tests/__init__.py         |    0
 {wsgi => coprs_frontend}/tests/coprs_test_case.py  |    0
 .../tests/test_views/test_coprs_ns/__init__.py     |    0
 .../tests/test_views/test_coprs_ns/test_builds.py  |    0
 .../tests/test_views/test_coprs_ns/test_general.py |    0
 wsgi/application                                   |   12 ------------
 48 files changed, 32 insertions(+), 23 deletions(-)

diff --git a/wsgi/TODO b/coprs_frontend/TODO
similarity index 100%
rename from wsgi/TODO
rename to coprs_frontend/TODO
diff --git a/wsgi/alembic.ini b/coprs_frontend/alembic.ini
similarity index 100%
rename from wsgi/alembic.ini
rename to coprs_frontend/alembic.ini
diff --git a/wsgi/alembic/env.py b/coprs_frontend/alembic/env.py
similarity index 100%
rename from wsgi/alembic/env.py
rename to coprs_frontend/alembic/env.py
diff --git a/wsgi/alembic/script.py.mako b/coprs_frontend/alembic/script.py.mako
similarity index 100%
rename from wsgi/alembic/script.py.mako
rename to coprs_frontend/alembic/script.py.mako
diff --git a/wsgi/alembic/versions/595a31c145fb_initial_db_setup.py b/coprs_frontend/alembic/versions/595a31c145fb_initial_db_setup.py
similarity index 100%
rename from wsgi/alembic/versions/595a31c145fb_initial_db_setup.py
rename to coprs_frontend/alembic/versions/595a31c145fb_initial_db_setup.py
diff --git a/coprs_frontend/application b/coprs_frontend/application
new file mode 100644
index 0000000..3a5e954
--- /dev/null
+++ b/coprs_frontend/application
@@ -0,0 +1,12 @@
+#!/usr/bin/python
+import logging
+import os
+import sys
+
+# so that errors are not sent to stdout
+logging.basicConfig(stream = sys.stderr)
+
+os.environ['COPRS_ENVIRON_PRODUCTION'] = '1'
+sys.path.insert(0, os.path.dirname(__file__))
+
+from coprs import app as application
diff --git a/coprs_frontend/coprs.conf.example b/coprs_frontend/coprs.conf.example
new file mode 100644
index 0000000..b0b0cfa
--- /dev/null
+++ b/coprs_frontend/coprs.conf.example
@@ -0,0 +1,16 @@
+<VirtualHost 127.0.0.1:8000>
+    ServerName 127.0.0.1
+
+    WSGIDaemonProcess 127.0.0.1 user=coprs group=coprs threads=5
+    WSGIScriptAlias / /var/www/wsgi/application
+    WSGIProcessGroup 127.0.0.1
+
+    ErrorLog logs/error_coprs
+    CustomLog logs/access_coprs common
+
+    <Directory /var/www/wsgi>
+        WSGIApplicationGroup %{GLOBAL}
+        Order deny,allow
+        Allow from all
+    </Directory>
+</VirtualHost>
diff --git a/wsgi/coprs/__init__.py b/coprs_frontend/coprs/__init__.py
similarity index 100%
rename from wsgi/coprs/__init__.py
rename to coprs_frontend/coprs/__init__.py
diff --git a/wsgi/coprs/config.py b/coprs_frontend/coprs/config.py
similarity index 63%
rename from wsgi/coprs/config.py
rename to coprs_frontend/coprs/config.py
index 7dde9d7..e8a403e 100644
--- a/wsgi/coprs/config.py
+++ b/coprs_frontend/coprs/config.py
@@ -1,16 +1,9 @@
 import os
 
-REPO_DIR = ''
-if 'OPENSHIFT_REPO_DIR' in os.environ:
-    REPO_DIR = os.environ['OPENSHIFT_REPO_DIR']
-
-DATA_DIR = ''
-if 'OPENSHIFT_DATA_DIR' in os.environ:
-    DATA_DIR = os.environ['OPENSHIFT_DATA_DIR']
-
 class Config(object):
-    DATABASE = os.path.join(REPO_DIR, '../data/copr.db')
-    OPENID_STORE = os.path.join(DATA_DIR, '../openid_store')
+    DATA_DIR = os.path.join(os.path.dirname(__file__), '../../data')
+    DATABASE = os.path.join(DATA_DIR, 'copr.db')
+    OPENID_STORE = os.path.join(DATA_DIR, 'openid_store')
     SECRET_KEY = 'THISISNOTASECRETATALL'
     BACKEND_PASSWORD = 'thisisbackend'
 
@@ -18,7 +11,7 @@ class Config(object):
     SQLALCHEMY_DATABASE_URI = 'sqlite:///' + os.path.abspath(DATABASE)
 
 class ProductionConfig(Config):
-    pass
+    DEBUG = False
 
 class DevelopmentConfig(Config):
     DEBUG = True
diff --git a/wsgi/coprs/constants.py b/coprs_frontend/coprs/constants.py
similarity index 100%
rename from wsgi/coprs/constants.py
rename to coprs_frontend/coprs/constants.py
diff --git a/wsgi/coprs/exceptions.py b/coprs_frontend/coprs/exceptions.py
similarity index 100%
rename from wsgi/coprs/exceptions.py
rename to coprs_frontend/coprs/exceptions.py
diff --git a/wsgi/coprs/filters.py b/coprs_frontend/coprs/filters.py
similarity index 100%
rename from wsgi/coprs/filters.py
rename to coprs_frontend/coprs/filters.py
diff --git a/wsgi/coprs/forms.py b/coprs_frontend/coprs/forms.py
similarity index 100%
rename from wsgi/coprs/forms.py
rename to coprs_frontend/coprs/forms.py
diff --git a/wsgi/coprs/helpers.py b/coprs_frontend/coprs/helpers.py
similarity index 100%
rename from wsgi/coprs/helpers.py
rename to coprs_frontend/coprs/helpers.py
diff --git a/wsgi/coprs/logic/.coprs_logic.py.swo b/coprs_frontend/coprs/logic/.coprs_logic.py.swo
similarity index 100%
rename from wsgi/coprs/logic/.coprs_logic.py.swo
rename to coprs_frontend/coprs/logic/.coprs_logic.py.swo
diff --git a/wsgi/coprs/logic/__init__.py b/coprs_frontend/coprs/logic/__init__.py
similarity index 100%
rename from wsgi/coprs/logic/__init__.py
rename to coprs_frontend/coprs/logic/__init__.py
diff --git a/wsgi/coprs/logic/builds_logic.py b/coprs_frontend/coprs/logic/builds_logic.py
similarity index 100%
rename from wsgi/coprs/logic/builds_logic.py
rename to coprs_frontend/coprs/logic/builds_logic.py
diff --git a/wsgi/coprs/logic/coprs_logic.py b/coprs_frontend/coprs/logic/coprs_logic.py
similarity index 100%
rename from wsgi/coprs/logic/coprs_logic.py
rename to coprs_frontend/coprs/logic/coprs_logic.py
diff --git a/wsgi/coprs/models.py b/coprs_frontend/coprs/models.py
similarity index 100%
rename from wsgi/coprs/models.py
rename to coprs_frontend/coprs/models.py
diff --git a/wsgi/coprs/static/README b/coprs_frontend/coprs/static/README
similarity index 100%
rename from wsgi/coprs/static/README
rename to coprs_frontend/coprs/static/README
diff --git a/wsgi/coprs/static/style.css b/coprs_frontend/coprs/static/style.css
similarity index 100%
rename from wsgi/coprs/static/style.css
rename to coprs_frontend/coprs/static/style.css
diff --git a/wsgi/coprs/templates/404.html b/coprs_frontend/coprs/templates/404.html
similarity index 100%
rename from wsgi/coprs/templates/404.html
rename to coprs_frontend/coprs/templates/404.html
diff --git a/wsgi/coprs/templates/_helpers.html b/coprs_frontend/coprs/templates/_helpers.html
similarity index 100%
rename from wsgi/coprs/templates/_helpers.html
rename to coprs_frontend/coprs/templates/_helpers.html
diff --git a/wsgi/coprs/templates/coprs/_builds_table.html b/coprs_frontend/coprs/templates/coprs/_builds_table.html
similarity index 100%
rename from wsgi/coprs/templates/coprs/_builds_table.html
rename to coprs_frontend/coprs/templates/coprs/_builds_table.html
diff --git a/wsgi/coprs/templates/coprs/_coprs_forms.html b/coprs_frontend/coprs/templates/coprs/_coprs_forms.html
similarity index 100%
rename from wsgi/coprs/templates/coprs/_coprs_forms.html
rename to coprs_frontend/coprs/templates/coprs/_coprs_forms.html
diff --git a/wsgi/coprs/templates/coprs/_permissions_table.html b/coprs_frontend/coprs/templates/coprs/_permissions_table.html
similarity index 100%
rename from wsgi/coprs/templates/coprs/_permissions_table.html
rename to coprs_frontend/coprs/templates/coprs/_permissions_table.html
diff --git a/wsgi/coprs/templates/coprs/add.html b/coprs_frontend/coprs/templates/coprs/add.html
similarity index 100%
rename from wsgi/coprs/templates/coprs/add.html
rename to coprs_frontend/coprs/templates/coprs/add.html
diff --git a/wsgi/coprs/templates/coprs/detail.html b/coprs_frontend/coprs/templates/coprs/detail.html
similarity index 100%
rename from wsgi/coprs/templates/coprs/detail.html
rename to coprs_frontend/coprs/templates/coprs/detail.html
diff --git a/wsgi/coprs/templates/coprs/edit.html b/coprs_frontend/coprs/templates/coprs/edit.html
similarity index 100%
rename from wsgi/coprs/templates/coprs/edit.html
rename to coprs_frontend/coprs/templates/coprs/edit.html
diff --git a/wsgi/coprs/templates/coprs/show.html b/coprs_frontend/coprs/templates/coprs/show.html
similarity index 100%
rename from wsgi/coprs/templates/coprs/show.html
rename to coprs_frontend/coprs/templates/coprs/show.html
diff --git a/wsgi/coprs/templates/coprs/show_builds.html b/coprs_frontend/coprs/templates/coprs/show_builds.html
similarity index 100%
rename from wsgi/coprs/templates/coprs/show_builds.html
rename to coprs_frontend/coprs/templates/coprs/show_builds.html
diff --git a/wsgi/coprs/templates/layout.html b/coprs_frontend/coprs/templates/layout.html
similarity index 100%
rename from wsgi/coprs/templates/layout.html
rename to coprs_frontend/coprs/templates/layout.html
diff --git a/wsgi/coprs/templates/login.html b/coprs_frontend/coprs/templates/login.html
similarity index 100%
rename from wsgi/coprs/templates/login.html
rename to coprs_frontend/coprs/templates/login.html
diff --git a/wsgi/coprs/views/__init__.py b/coprs_frontend/coprs/views/__init__.py
similarity index 100%
rename from wsgi/coprs/views/__init__.py
rename to coprs_frontend/coprs/views/__init__.py
diff --git a/wsgi/coprs/views/backend_ns/__init__.py b/coprs_frontend/coprs/views/backend_ns/__init__.py
similarity index 100%
rename from wsgi/coprs/views/backend_ns/__init__.py
rename to coprs_frontend/coprs/views/backend_ns/__init__.py
diff --git a/wsgi/coprs/views/backend_ns/backend_general.py b/coprs_frontend/coprs/views/backend_ns/backend_general.py
similarity index 100%
rename from wsgi/coprs/views/backend_ns/backend_general.py
rename to coprs_frontend/coprs/views/backend_ns/backend_general.py
diff --git a/wsgi/coprs/views/coprs_ns/__init__.py b/coprs_frontend/coprs/views/coprs_ns/__init__.py
similarity index 100%
rename from wsgi/coprs/views/coprs_ns/__init__.py
rename to coprs_frontend/coprs/views/coprs_ns/__init__.py
diff --git a/wsgi/coprs/views/coprs_ns/coprs_builds.py b/coprs_frontend/coprs/views/coprs_ns/coprs_builds.py
similarity index 100%
rename from wsgi/coprs/views/coprs_ns/coprs_builds.py
rename to coprs_frontend/coprs/views/coprs_ns/coprs_builds.py
diff --git a/wsgi/coprs/views/coprs_ns/coprs_general.py b/coprs_frontend/coprs/views/coprs_ns/coprs_general.py
similarity index 100%
rename from wsgi/coprs/views/coprs_ns/coprs_general.py
rename to coprs_frontend/coprs/views/coprs_ns/coprs_general.py
diff --git a/wsgi/coprs/views/misc.py b/coprs_frontend/coprs/views/misc.py
similarity index 100%
rename from wsgi/coprs/views/misc.py
rename to coprs_frontend/coprs/views/misc.py
diff --git a/wsgi/manage.py b/coprs_frontend/manage.py
similarity index 100%
rename from wsgi/manage.py
rename to coprs_frontend/manage.py
diff --git a/wsgi/runapp.py b/coprs_frontend/runapp.py
similarity index 100%
rename from wsgi/runapp.py
rename to coprs_frontend/runapp.py
diff --git a/wsgi/tests/__init__.py b/coprs_frontend/tests/__init__.py
similarity index 100%
rename from wsgi/tests/__init__.py
rename to coprs_frontend/tests/__init__.py
diff --git a/wsgi/tests/coprs_test_case.py b/coprs_frontend/tests/coprs_test_case.py
similarity index 100%
rename from wsgi/tests/coprs_test_case.py
rename to coprs_frontend/tests/coprs_test_case.py
diff --git a/wsgi/tests/test_views/test_coprs_ns/__init__.py b/coprs_frontend/tests/test_views/test_coprs_ns/__init__.py
similarity index 100%
rename from wsgi/tests/test_views/test_coprs_ns/__init__.py
rename to coprs_frontend/tests/test_views/test_coprs_ns/__init__.py
diff --git a/wsgi/tests/test_views/test_coprs_ns/test_builds.py b/coprs_frontend/tests/test_views/test_coprs_ns/test_builds.py
similarity index 100%
rename from wsgi/tests/test_views/test_coprs_ns/test_builds.py
rename to coprs_frontend/tests/test_views/test_coprs_ns/test_builds.py
diff --git a/wsgi/tests/test_views/test_coprs_ns/test_general.py b/coprs_frontend/tests/test_views/test_coprs_ns/test_general.py
similarity index 100%
rename from wsgi/tests/test_views/test_coprs_ns/test_general.py
rename to coprs_frontend/tests/test_views/test_coprs_ns/test_general.py
diff --git a/wsgi/application b/wsgi/application
deleted file mode 100644
index b849d4f..0000000
--- a/wsgi/application
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/usr/bin/python
-import os
-
-virtenv = os.environ['APPDIR'] + '/virtenv/'
-os.environ['PYTHON_EGG_CACHE'] = os.path.join(virtenv, 'lib/python2.6/site-packages')
-virtualenv = os.path.join(virtenv, 'bin/activate_this.py')
-try:
-    execfile(virtualenv, dict(__file__=virtualenv))
-except IOError:
-    pass
-
-from coprs import app as application



More information about the copr-devel mailing list