Browse Source

nginx stuff

Torsten Simon 2 years ago
parent
commit
94e6d7cdc9
3 changed files with 25 additions and 3 deletions
  1. 6 3
      docker-compose.yml
  2. 9 0
      nginx/Dockerfile
  3. 10 0
      nginx/nginx.conf

+ 6 - 3
docker-compose.yml

@@ -9,11 +9,13 @@ services:
       volumes:
           - images-data:/app/images
   fileserver:
-      image: halverneus/static-file-server:v1.8.9
+      build:
+        context: nginx
+      restart: unless-stopped
       ports:
-        - 80:8080
+        - 80:80
       volumes:
-        - images-data:/web
+        - images-data:/usr/share/nginx/images
   grafana:
       image: grafana/grafana:7.5.7
       ports:
@@ -28,6 +30,7 @@ services:
     #image: influxdb:1.8
     image: arm32v7/influxdb:latest
     container_name: influxdb
+    restart: unless-stopped
     ports:
       - "8083:8083"
       - "8086:8086"

+ 9 - 0
nginx/Dockerfile

@@ -0,0 +1,9 @@
+from nginx:1.23.3-alpine
+
+COPY nginx.conf /etc/nginx/conf.d/default.conf
+RUN rm -rf /usr/share/nginx/html/50x.html
+RUN rm -rf /usr/share/nginx/html/index.html
+
+STOPSIGNAL SIGQUIT
+
+CMD ["nginx", "-g", "daemon off;"]

+ 10 - 0
nginx/nginx.conf

@@ -0,0 +1,10 @@
+server {
+    listen       80;
+    server_name  localhost;
+    #access_log  /var/log/nginx/host.access.log  main;
+    location / {
+        root   /usr/share/nginx/html;
+        autoindex on;
+        #index  index.html index.htm;
+    }
+}