Unverified Commit cc9d7d85 authored by Tom Moulard's avatar Tom Moulard
Browse files

video: adding an nginx server to provide downloaded files

parent 44f630de
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
@@ -155,6 +155,19 @@ services:
      - 'traefik.port=9091'
      - 'traefik.frontend.auth.basic.users=${USERNAME}:${HASHED_PASSWORD}'

  video:
    image: nginx:stable-alpine
    volumes:
      - './transmission:/etc/nginx/conf.d'
    networks:
      - srv
    labels:
      - 'traefik.enable=true'
      - 'traefik.backend=video'
      - 'traefik.frontend.rule=Host:video.${SITE}'
      - 'traefik.port=80'
      - 'traefik.frontend.auth.basic.users=${USERNAME}:${HASHED_PASSWORD}'

  vpn:
    image: hwdsl2/ipsec-vpn-server:latest
    restart: always
+14 −0
Original line number Diff line number Diff line
server {
    root /etc/nginx/conf.d/downloads;
    index index.html;

    location /{
        try_files $uri $uri/ =404;
        autoindex on;
    }
    # deny all direct access for these folders
    location ~* /(.git|cache|bin|logs|backup|tests)/.*$ { return 403; }
    location ~* ^.+\.(ico|js|gif|jpg|jpeg|png|bmp|mp3|mp4|mkv)$ {
        expires 30d;
    }
}