Browse Source

add a dockerfile for the UI in mutability/dump1090.git and use it in the adsb compose example

sungo 10 months ago
parent
commit
d2e9e160d3
3 changed files with 55 additions and 1 deletions
  1. 1 1
      compose_files/adsb/docker-compose.yml
  2. 13 0
      mutability-ui/Dockerfile
  3. 41 0
      mutability-ui/nginx.conf

+ 1 - 1
compose_files/adsb/docker-compose.yml

@@ -20,7 +20,7 @@ services:
       - SBS_RECEIVER_LAT=0
       - SBS_RECEIVER_LON=0
   web:
-    image: sungo/mictronics-ui:latest
+    image: sungo/mutability-ui:latest
     restart: always
     expose:
       - 8080

+ 13 - 0
mutability-ui/Dockerfile

@@ -0,0 +1,13 @@
+FROM nginx:alpine
+
+RUN apk add --no-cache --update git ca-certificates 
+WORKDIR /tmp
+RUN git clone --depth 1 https://github.com/mutability/dump1090.git
+RUN mv dump1090/public_html/* /usr/share/nginx/html
+RUN rm -rf dump1090
+
+WORKDIR /usr/share/nginx/html
+RUN cp gmap.html index.html
+
+COPY nginx.conf /etc/nginx/nginx.conf
+

+ 41 - 0
mutability-ui/nginx.conf

@@ -0,0 +1,41 @@
+events {
+    worker_connections 1024;
+}
+
+http {
+    include       mime.types;
+    default_type  application/octet-stream;
+
+    log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
+                      '$status $body_bytes_sent "$http_referer" '
+                      '"$http_user_agent" "$http_x_forwarded_for"';
+
+    access_log stderr main;
+    error_log stderr warn;
+
+    sendfile        on;
+    keepalive_timeout  0;
+
+    server {
+        listen       80;
+        server_name  _;
+
+        location / {
+            root   /usr/share/nginx/html;
+            index  index.html;
+        }
+
+        location /data/aircraft.json {
+            proxy_pass http://sbshttp:8000/data/aircraft.json;
+        }
+
+        location /data/receiver.json {
+            proxy_pass http://sbshttp:8000/data/receiver.json;
+        }
+
+        location /data/stats.json {
+            proxy_pass http://sbshttp:8000/data/stats.json;
+        }
+
+    }
+}