Skip to content

Commit

Permalink
#
Browse files Browse the repository at this point in the history
  • Loading branch information
czy21 committed Oct 16, 2024
1 parent 86e724e commit 3d7459c
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 87 deletions.
47 changes: 0 additions & 47 deletions server/docker/app/nginx/node/nas/conf/conf.d/openwrt.conf

This file was deleted.

19 changes: 1 addition & 18 deletions server/docker/app/traefik/node/nas/conf/conf.d/app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,4 @@ http:
service: alist@docker
openwrt-firmware:
rule: Host(`openwrt-firmware.czy21-internal.com`)
service: openwrt-content@docker
middlewares:
- openwrt-firmware-proxy
openwrt-download:
rule: Host(`openwrt-download.czy21-internal.com`)
service: openwrt-content@docker
middlewares:
- openwrt-download-proxy

middlewares:
openwrt-download-proxy:
replacePathRegex:
regex: "^/"
replacement: "/download/"
openwrt-firmware-proxy:
replacePathRegex:
regex: "^/"
replacement: "/firmware/"
service: openwrt-firmware@docker
25 changes: 8 additions & 17 deletions server/docker/os/ubuntu-openwrt/conf/nginx/conf.d/default.conf
Original file line number Diff line number Diff line change
@@ -1,25 +1,16 @@

server {
listen 8081;
listen 80;
server_name localhost;

port_in_redirect off;


location / {
alias /data/firmware/;
root /data/firmware/;
index index.html;
try_files $uri $uri/ /index.html;
}
}

server {
listen 8082;
server_name localhost;

port_in_redirect off;

add_header Access-Control-Allow-Origin *;

location / {
alias /data/download/;
location /download {
root /data/;
autoindex on;
}

}
10 changes: 5 additions & 5 deletions server/docker/os/ubuntu-openwrt/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ version: "3.9"

x-traefik-label: &traefik-label
traefik.enable: true
traefik.http.routers.openwrt-content.service: openwrt-content
traefik.http.services.openwrt-content.loadbalancer.server.port: 80
traefik.http.routers.openwrt-firmware.service: openwrt-content
traefik.http.services.openwrt-firmware.loadbalancer.server.port: 80

services:
openwrt-builder:
Expand All @@ -17,13 +17,13 @@ services:
- {{ param_docker_data }}/{{ param_role_name }}/data/:/data/
restart: always

openwrt-content:
openwrt-firmware:
image: nginx:1.27.0-alpine
labels:
<<: *traefik-label
pull_policy: always
container_name: openwrt-content
hostname: openwrt-builder
container_name: openwrt-firmware
hostname: openwrt-firmware
volumes:
- {{ param_docker_data }}/{{ param_role_name }}/conf/nginx/conf.d/default.conf:/etc/nginx/conf.d/default.conf
- {{ param_docker_data }}/{{ param_role_name }}/data/:/data/
Expand Down

0 comments on commit 3d7459c

Please sign in to comment.