[extensions-web/wip/openshift] openshift: implementation



commit 78a379433a38a77f0936265fa02e66f0b340f34e
Author: Yuri Konotopov <ykonotopov gnome org>
Date:   Wed Dec 5 01:46:12 2018 +0400

    openshift: implementation

 openshift/templates/extensions-web-nginx.json | 43 ++++++++++++++++++++++++++-
 1 file changed, 42 insertions(+), 1 deletion(-)
---
diff --git a/openshift/templates/extensions-web-nginx.json b/openshift/templates/extensions-web-nginx.json
index 2deafe0..d8bab8e 100644
--- a/openshift/templates/extensions-web-nginx.json
+++ b/openshift/templates/extensions-web-nginx.json
@@ -21,6 +21,17 @@
       "app": "extensions-web"
   },
   "objects": [
+    {
+      "kind": "ConfigMap",
+      "apiVersion": "v1",
+      "metadata": {
+        "name": "${NAME}"
+      },
+      "data": {
+        "media-root": "/extensions-web/www/uploaded-files",
+        "static-root": "/extensions-web/www/static-files"
+      }
+    },
     {
       "kind": "Secret",
       "apiVersion": "v1",
@@ -97,11 +108,40 @@
           }
         },
         "postCommit": {
-            "script": "python manage.py test"
+            "script": "bash -c 'python manage.py collectstatic --noinput && python manage.py test'"
         },
         "strategy": {
           "type": "Docker",
           "dockerStrategy": {
+            "env": [
+                {
+                    "name": "EGO_SECRET_KEY",
+                    "valueFrom": {
+                        "secretKeyRef": {
+                            "name": "extensions-web",
+                            "key": "secret-key"
+                        }
+                    }
+                },
+                {
+                    "name": "EGO_MEDIA_ROOT",
+                    "valueFrom": {
+                        "configMapKeyRef": {
+                            "name": "extensions-web",
+                            "key": "media-root"
+                        }
+                    }
+                },
+                {
+                    "name": "EGO_STATIC_ROOT",
+                    "valueFrom": {
+                        "configMapKeyRef": {
+                            "name": "extensions-web",
+                            "key": "static-root"
+                        }
+                    }
+                }
+            ],
             "dockerfilePath": "openshift/docker/Dockerfile"
           }
         },
@@ -232,6 +272,7 @@
               {
                 "name": "${NAME}",
                 "image": " ",
+                "command": "bash -c 'python manage.py migrate && uwsgi --enable-threads --ini 
/extensions-web/wsgi.ini'",
                 "ports": [
                   {
                     "containerPort": 8001


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]