Export custom static folder

This commit is contained in:
naiba 2023-11-29 17:13:45 +08:00
parent a823da1f29
commit ad99a5d032
4 changed files with 4 additions and 4 deletions

View File

@ -35,7 +35,7 @@ jobs:
- name: fix dist
run: |
cp dist/dashboard-linux-arm-7 dist/dashboard-linux-arm
mv dist/dashboard-linux-arm-7 dist/dashboard-linux-arm
- name: Log in to the GHCR
uses: docker/login-action@master

2
.gitignore vendored
View File

@ -19,4 +19,4 @@
/cmd/dashboard/main
/config.yml
/resource/template/theme-custom
/resource/static/theme-custom
/resource/static/custom

View File

@ -43,6 +43,7 @@ func ServeWeb(port uint) *http.Server {
panic(err)
}
r.StaticFS("/static", http.FS(staticFs))
r.Static("/static-custom", "resource/static/custom")
routers(r)
page404 := func(c *gin.Context) {

View File

@ -6,10 +6,9 @@ services:
restart: always
volumes:
- ./data:/dashboard/data
- ./static-custom/static:/dashboard/resource/static/custom:ro
- ./theme-custom/template:/dashboard/resource/template/theme-custom:ro
- ./theme-custom/static:/dashboard/resource/static/theme-custom:ro
- ./dashboard-custom/template:/dashboard/resource/template/dashboard-custom:ro
- ./dashboard-custom/static:/dashboard/resource/static/dashboard-custom:ro
ports:
- nz_site_port:80
- nz_grpc_port:nz_grpc_port