josh brickner пре 2 година
родитељ
комит
164ec5251e
4 измењених фајлова са 126 додато и 116 уклоњено
  1. 7 9
      Caddyfile
  2. 8 2
      docker-compose.yml
  3. 110 0
      public/b28eab97dcd6f3ad996c6aae3016f9b9
  4. 1 105
      public/index.html

+ 7 - 9
Caddyfile

@@ -1,18 +1,16 @@
-{
-	  http_port  8800
-    auto_https off
-}
+formstack.ai {
+    # Enable automatic HTTPS
+    tls josh@macinjo.sh 
 
-127.0.0.1:8800 {
+    # Serve static files from the current directory
     root * /opt/form-autoscaffold/public
     encode gzip
-    file_server
-}
 
-handle 127.0.0.1:8800/api.php {
-    encode gzip
+    # PHP FastCGI support
     php_fastcgi php:9000 {
         root /opt/form-autoscaffold/public
     }
+
+    file_server
 }
 

+ 8 - 2
docker-compose.yml

@@ -10,8 +10,14 @@ services:
     image: caddy:2.7.4-alpine
     container_name: web
     ports:
-      - 8800:8800
+      - 80:80
+      - 443:443
     volumes:
       - ./Caddyfile:/etc/caddy/Caddyfile
       - ./:/opt/form-autoscaffold
-
+  composer:
+    image: composer
+    volumes:
+      - ./:/app
+      - /root/.composer:/tmp
+ 

+ 110 - 0
public/b28eab97dcd6f3ad996c6aae3016f9b9

@@ -0,0 +1,110 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+    <meta charset="UTF-8">
+    <meta name="viewport" content="width=device-width, initial-scale=1.0">
+    <title>Form Assistant</title>
+    <link href="https://cdnjs.cloudflare.com/ajax/libs/tailwindcss/2.2.19/tailwind.min.css" rel="stylesheet">
+</head>
+<body class="bg-gray-100 p-10">
+
+    <form class="bg-white p-5 rounded shadow-lg w-full md:85 mx-auto" action="api.php" method="POST">
+        <h1 class="p-5 text-19 text-center">
+            <b>WELCOME TO</b>
+            <img src="WALTR.png" alt="WALTR" class="w-48 mx-auto">
+            <b>W</b>eb
+            <b>A</b>ssistant for
+            <b>L</b>anguage
+            <b>T</b>echnologies
+            <b>R</b>esearch
+        </h1>
+
+        <p>
+            Fill out the form below to have W.A.L.T.R. generate a Formstack form. Please note, this is a limited tech demo.
+        </p>
+
+        <br>
+        <label class="block mb-2 font-bold text-gray-500">Industry</label>
+        <select class="w-full p-2 border rounded" required name="industry">
+            <option value="">Choose One...</option>
+            <option>Education</option>
+            <option>Real Estate</option>
+            <option>Retail</option>
+            <option>Non-Profit</option>
+            <option>Hospitality</option>
+            <option>Legal</option>
+            <option>Government</option>
+            <option>Technology</option>
+            <option>Financial Services</option>
+            <option>Healthcare</option>
+            <option>Manufacturing</option>
+            <option>Food</option>
+            <option>Agriculture</option>
+            <option>E-commerce</option>
+            <option>Transportation</option>
+            <option>Entertainment</option>
+            <option></option>
+        </select>
+
+        <br>
+        <br>
+
+        <label class="block mb-2 font-bold text-gray-500">Department / Category</label>
+        <select class="w-full p-2 border rounded" required name="dept">
+            <option value="">Choose One...</option>
+            <option>Finance</option>
+            <option>Human Resources</option>
+            <option>Marketing</option>
+            <option>Sales</option>
+            <option>Operations</option>
+            <option>Customer Service</option>
+            <option>Information Technology (IT)</option>
+            <option>Legal</option>
+            <option>Research and Development (R&D)</option>
+            <option>Procurement</option>
+            <option>Supply Chain</option>
+            <option>Quality Assurance</option>
+            <option>Production</option>
+            <option>Engineering</option>
+            <option>Administrative</option>
+            <option>Public Relations</option>
+            <option>Compliance</option>
+            <option>Security</option>
+            <option>Logistics</option>
+            <option>Product Management</option>
+        </select>
+
+        <br>
+        <br>
+
+        <label class="block mb-2 font-bold text-gray-500">Form Name</label>
+        <input required type="text" class="w-full p-2 border rounded" name="name" placeholder="e.g. Summer Event Registration Form">
+
+        <br>
+        <br>
+
+        <label class="block mb-2 font-bold text-gray-500">Field List</label>
+        <textarea required id="user-input" class="w-full p-2 border rounded" name="fields" rows="5" placeholder="Separate fields by comma or new lines, e.g.:&#10;email, name, phone ..."></textarea>
+
+        <br>
+        <br>
+
+        <label class="block mb-2 font-bold text-gray-500">OpenAI API Token</label>
+        <input required type="password" name="ai_tok" class="w-full p-2 border rounded" placeholder="OpenAI Token">
+
+        <br>
+        <br>
+
+        <label class="block mb-2 font-bold text-gray-500">Formstack oAuth Token</label>
+        <input required type="password" name="fs_tok" class="w-full p-2 border rounded" placeholder="Formstack Token">
+
+        <br>
+        <br>
+
+        <input type="submit" value="Generate Form" class="mt-3 bg-blue-500 text-white py-2 px-4 rounded hover:bg-blue-700">
+
+    </form>
+
+</body>
+</html>
+

+ 1 - 105
public/index.html

@@ -1,105 +1 @@
-<!DOCTYPE html>
-<html lang="en">
-<head>
-    <meta charset="UTF-8">
-    <meta name="viewport" content="width=device-width, initial-scale=1.0">
-    <title>Form Assistant</title>
-    <link href="https://cdnjs.cloudflare.com/ajax/libs/tailwindcss/2.2.19/tailwind.min.css" rel="stylesheet">
-</head>
-<body class="bg-gray-100 p-10">
-
-    <form class="bg-white p-5 rounded shadow-lg w-full md:w-1/2 mx-auto" action="api.php" method="POST">
-        <h1 class="p-5 text-19 text-center">
-            <b>WELCOME TO</b>
-            <img src="WALTR.png" alt="WALTR" class="w-48 mx-auto">
-            <b>W</b>eb
-            <b>A</b>ssistant for
-            <b>L</b>anguage
-            <b>T</b>echnologies
-            <b>R</b>esearch
-        </h1>
-
-        <p>
-            Fill out the form below to have W.A.L.T.R. generate a Formstack form. Please note, this is a limited tech demo.
-        </p>
-
-        <br>
-        <label class="block mb-2 font-bold text-gray-500">Industry</label>
-        <select class="w-full p-2 border rounded" required name="industry">
-            <option value="">Choose One...</option>
-            <option>Education</option>
-            <option>Real Estate</option>
-            <option>Retail</option>
-            <option>Non-Profit</option>
-            <option>Hospitality</option>
-            <option>Legal</option>
-            <option>Government</option>
-            <option>Technology</option>
-            <option>Financial Services</option>
-            <option>Healthcare</option>
-            <option>Manufacturing</option>
-            <option>Food</option>
-            <option>Agriculture</option>
-            <option>E-commerce</option>
-            <option>Transportation</option>
-            <option>Entertainment</option>
-            <option></option>
-        </select>
-
-        <br>
-        <br>
-
-        <label class="block mb-2 font-bold text-gray-500">Department / Category</label>
-        <select class="w-full p-2 border rounded" required name="dept">
-            <option value="">Choose One...</option>
-            <option>Finance</option>
-            <option>Human Resources</option>
-            <option>Marketing</option>
-            <option>Sales</option>
-            <option>Operations</option>
-            <option>Customer Service</option>
-            <option>Information Technology (IT)</option>
-            <option>Legal</option>
-            <option>Research and Development (R&D)</option>
-            <option>Procurement</option>
-            <option>Supply Chain</option>
-            <option>Quality Assurance</option>
-            <option>Production</option>
-            <option>Engineering</option>
-            <option>Administrative</option>
-            <option>Public Relations</option>
-            <option>Compliance</option>
-            <option>Security</option>
-            <option>Logistics</option>
-            <option>Product Management</option>
-        </select>
-
-        <br>
-        <br>
-
-        <label class="block mb-2 font-bold text-gray-500">Form Name</label>
-        <input required type="text" class="w-full p-2 border rounded" name="name" placeholder="e.g. Summer Event Registration Form">
-
-        <br>
-        <br>
-
-        <label class="block mb-2 font-bold text-gray-500">Field List</label>
-        <textarea required id="user-input" class="w-full p-2 border rounded" name="fields" rows="5" placeholder="Separate fields by comma or new lines, e.g.:&#10;email, name, phone ..."></textarea>
-
-        <br>
-        <br>
-
-        <input type="password" name="ai_tok" class="w-full p-2 border rounded" placeholder="OpenAI Token (optional)">
-        <br>
-        <input type="password" name="fs_tok" class="w-full p-2 border rounded" placeholder="Formstack Token (optional)">
-
-        <br>
-        <br>
-
-        <input type="submit" value="Generate Form" class="mt-3 bg-blue-500 text-white py-2 px-4 rounded hover:bg-blue-700">
-
-    </form>
-
-</body>
-</html>
-
+You're looking for <a href="http://www.formstack.com" rel="noreferrer">formstack.com</a>!