Răsfoiți Sursa

add pyapi to docker-compose

Pi 1 an în urmă
părinte
comite
04d28f13b1
8 a modificat fișierele cu 33 adăugiri și 5 ștergeri
  1. 5 0
      .dockerignore
  2. 2 0
      .gitignore
  3. 1 0
      .gitmodules
  4. 1 0
      Dockerfile
  5. 11 1
      docker-compose.yml
  6. 8 3
      index.html
  7. 4 0
      nginx.conf
  8. 1 1
      prayer-generator

+ 5 - 0
.dockerignore

@@ -1 +1,6 @@
 feed/
+media/
+prayer-generator
+!prayer-generator/xml
+!prayer-generator/license
+

+ 2 - 0
.gitignore

@@ -1 +1,3 @@
 feed/
+media/
+.env

+ 1 - 0
.gitmodules

@@ -1,3 +1,4 @@
 [submodule "prayer-generator"]
 	path = prayer-generator
 	url = https://gogs.shandan.one/gogsadmin/prayer-generator.git
+	branch = master

+ 1 - 0
Dockerfile

@@ -1,5 +1,6 @@
 FROM nginx:alpine
 COPY nginx.conf /etc/nginx/nginx.conf
+COPY prayer-generator/license /usr/share/nginx/html/license
 COPY css /usr/share/nginx/html/css
 COPY prayer-generator/xml /usr/share/nginx/html/xml
 COPY index.html /usr/share/nginx/html

+ 11 - 1
docker-compose.yml

@@ -1,5 +1,5 @@
 services:
-  www:
+  home:
     image: home-launcher
     build: .
     ports:
@@ -8,3 +8,13 @@ services:
     volumes:
       - ./feed:/usr/share/nginx/html/feed
       - ./media:/usr/share/nginx/html/media
+  pyapi:
+    image: pyapi
+    build: ./prayer-generator/rest
+    environment:
+      HOST: 192.168.0.20
+      USER: pgdb
+      PASSWORD: ${PASSWORD}
+    ports:
+      - 11888:11888
+    restart: always

+ 8 - 3
index.html

@@ -123,14 +123,19 @@
 <div class="pure-g">
   <div class="pure-u-1-2 pure-u-sm-1-2 pure-u-md-1-3 pure-u-lg-1-4 l-box">
     <form action="https://wol.shandan.one"
-      id="wol" rel="external" method="get" target="_self">
+      id="wol-combo" rel="external" method="get" target="_self">
       <div class="card">
-        <button form="wol" style="color: firebrick; border-color: firebrick">
+        <button form="wol-combo" style="color: firebrick; border-color: firebrick">
           <div class="image">
             <h2>Wol</h2>
           </div>
           <div class="text">
             <h3>Wake a device</h3>
+	    <p>Wake a device from</p>
+            <p>
+<input type="radio" name="location" value="home"></label> <label>home
+<input type="radio" name="location" value="outside"></label> <label>outside
+            </p>
           </div>
         </button>
       </div>
@@ -194,7 +199,7 @@
           </div>
           <div class="text">
             <h3>Syncthing</h3>
-            <p>Manage and access git repositories</p>
+            <p>Monitor and configure file shares</p>
           </div>
         </button>
       </div>

+ 4 - 0
nginx.conf

@@ -13,6 +13,10 @@ http {
     }
     location /media/ {
     }
+    location /license/ {
+      charset UTF-8;
+      autoindex on;
+    }
     location /xml/ {
         types { } default_type "application/xhtml+xml; charset=utf-8";
  

+ 1 - 1
prayer-generator

@@ -1 +1 @@
-Subproject commit c15d5c3b8a4a3d67b8223225c7bf084bc1bad8a7
+Subproject commit ef00d097da464ea50124e15fdaec49999189913a