Browse Source

platformize

Nikola Kotur 5 years ago
parent
commit
8b84f8ca22
3 changed files with 62 additions and 0 deletions
  1. 52 0
      .platform.app.yaml
  2. 5 0
      .platform/routes.yaml
  3. 5 0
      .platform/services.yaml

+ 52 - 0
.platform.app.yaml

@@ -0,0 +1,52 @@
+name: app
+
+type: php:7.3
+build:
+    flavor: composer
+
+dependencies:
+  nodejs:
+    yarn: "*"
+
+variables:
+    php:
+        display_errors: Off
+
+hooks:
+    build: |
+        set -e
+        make build_frontend
+        mkdir -p web
+        # Move app where it should be
+        mv application assets doc inc plugins tpl vendor index.php shaarli_version.php webpack.config.js composer.json composer.lock web/
+        # Set up dirs
+        ln -s /tmp/app web/tmp
+        ln -s /tmp/cache web/cache
+        ln -s /tmp/pagecache web/pagecache
+        ln -s ../private web/data
+
+    deploy: |
+        set -e
+        mkdir -p /tmp/app /tmp/cache /tmp/pagecache
+
+disk: 2048
+
+mounts:
+    'private':
+        source: local
+        source_path: private
+
+web:
+    locations:
+        "/":
+            root: "web"
+            passthru: true
+            index: ["index.php"]
+        "/data":
+            allow: false
+        "/cache":
+            allow: false
+        "/pagecache":
+            allow: false
+        "/tmp":
+            allow: false

+ 5 - 0
.platform/routes.yaml

@@ -0,0 +1,5 @@
+# The routes of the project.
+
+"https://{default}/":
+    type: upstream
+    upstream: "app:http"

+ 5 - 0
.platform/services.yaml

@@ -0,0 +1,5 @@
+# This file defines services you want available to your application.
+
+#mysqldb:
+#    type: mysql:10.2
+#    disk: 2048