]> Untitled Git - proxy.git/commitdiff
Merged kanboard and public share with nginx proxy for easy deployment
authorClifton Palmer <clifton.james.palmer@protonmail.com>
Tue, 21 Feb 2023 16:56:41 +0000 (10:56 -0600)
committerClifton Palmer <clifton.james.palmer@protonmail.com>
Fri, 5 May 2023 12:05:46 +0000 (07:05 -0500)
.gitignore [new file with mode: 0644]
docker-compose.yml
nginx.conf [deleted file]
proxy/nginx.conf [new file with mode: 0644]
readme.txt [deleted file]

diff --git a/.gitignore b/.gitignore
new file mode 100644 (file)
index 0000000..4c49bd7
--- /dev/null
@@ -0,0 +1 @@
+.env
index b646b690a19bca1920ba599e808f677cbdb02b7d..12ff6bb8a387b260f50e1f6ec21d2cc293e43cb8 100644 (file)
@@ -1,12 +1,14 @@
+# requires variable config loading, such as:
+# docker stack deploy -c <(docker-compose config) proxy
+#
+# also needs an .env file with some variables like:
+# LOCAL_STORAGE=/mnt/data2/purplebirdman/art
+# IPV4_WAN=public.purplebirdman.com
+
 version: '3'
-networks:
-    proxy:
-        external:
-            name: proxy
 services:
-    nginx:
+    proxy:
         image: nginx:1.17
-        restart: on-failure
         deploy:
             restart_policy:
                 condition: on-failure
@@ -14,12 +16,44 @@ services:
                 max_attempts: 5
                 window: 10s
         volumes:
-        - ./nginx.conf:/etc/nginx/nginx.conf
+        - ./proxy/nginx.conf:/etc/nginx/nginx.conf
         environment:
         - NGINX_HOST=purplebirdman.com
         - NGINX_PORT=80
         ports:
         - 80:80
         - 443:443
-        networks:
-        - proxy
+    kanboard:
+        image: kanboard/kanboard:v1.2.26
+        deploy:
+            restart_policy:
+                condition: on-failure
+                delay: 5s
+                max_attempts: 5
+                window: 10s
+        volumes:
+        - kanboard_data:/var/www/app/data
+        - kanboard_plugins:/var/www/app/plugins
+        - kanboard_ssl:/etc/nginx/ssl
+    public:
+        image: cliftonpalmer/public:1.0.0
+        volumes:
+        - ${LOCAL_STORAGE}:/storage
+        - public_data:/usr/local/apache2/htdocs
+        environment:
+        - PUBLIC_ROOT_DIR=/storage
+        - PUBLIC_LINK_DIR=/usr/local/apache2/htdocs
+        - PUBLIC_HTTP_URI=http://${IPV4_WAN}
+volumes:
+    kanboard_data:
+        driver: local
+        driver_opts:
+            o: bind
+            type: none
+            device: /mnt/kanboard_data
+    kanboard_plugins:
+        driver: local
+    kanboard_ssl:
+        driver: local
+    public_data:
+        driver: local
diff --git a/nginx.conf b/nginx.conf
deleted file mode 100644 (file)
index f990def..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-worker_processes 1;
-
-events {
-    worker_connections 1024;
-}
-
-http {
-    server {
-        server_name kanban.purplebirdman.com;
-        client_max_body_size 20M;
-        location / {
-            proxy_pass http://kanboard_web;
-            proxy_set_header Host $host;
-        }
-    }
-    server {
-        server_name public.purplebirdman.com;
-        location / {
-            proxy_pass http://public_web;
-            proxy_set_header Host $host;
-        }
-    }
-}
diff --git a/proxy/nginx.conf b/proxy/nginx.conf
new file mode 100644 (file)
index 0000000..2698a6e
--- /dev/null
@@ -0,0 +1,24 @@
+worker_processes 1;
+
+events {
+    worker_connections 1024;
+}
+
+http {
+    server {
+        listen               80 default_server;
+        server_name          kanban.purplebirdman.com;
+        client_max_body_size 20M;
+        location / {
+            proxy_pass http://kanboard;
+            proxy_set_header Host $host;
+        }
+    }
+    server {
+        server_name public.purplebirdman.com;
+        location / {
+            proxy_pass http://public;
+            proxy_set_header Host $host;
+        }
+    }
+}
diff --git a/readme.txt b/readme.txt
deleted file mode 100644 (file)
index 9782c06..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-My nginx server for managing my web stuff. Needs a proxy overlay network that all the web stuff sits on:
-
-```
-docker network create --attachable --driver overlay proxy
-```