This commit is contained in:
parent
33754c6e0b
commit
d1275c3ce1
@ -5,7 +5,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: https://gitea.timerzz.com/timerzz/checkout@v4
|
uses: https://git.timerzz.com:20443/timerzz/checkout@v4
|
||||||
- name: build
|
- name: build
|
||||||
run: docker build -t ${{ vars.DOCKER_REGISTRY }}/${{ vars.IMAGE_NAME }}:1.3 -f Dockerfile .
|
run: docker build -t ${{ vars.DOCKER_REGISTRY }}/${{ vars.IMAGE_NAME }}:1.3 -f Dockerfile .
|
||||||
- name: tag
|
- name: tag
|
||||||
|
@ -1,7 +1,9 @@
|
|||||||
FROM oven/bun:1 as front
|
FROM node:20-slim AS front
|
||||||
COPY . /build
|
COPY . /build
|
||||||
WORKDIR /build/
|
WORKDIR /build/
|
||||||
RUN bun install && bun run build
|
RUN npm config set registry http://registry.npmmirror.com && npm install -g pnpm
|
||||||
|
|
||||||
|
RUN pnpm install && pnpm run build
|
||||||
|
|
||||||
FROM nginx:alpine
|
FROM nginx:alpine
|
||||||
COPY --from=front /build/dist /usr/share/dist
|
COPY --from=front /build/dist /usr/share/dist
|
||||||
|
30
nginx.conf
30
nginx.conf
@ -9,36 +9,6 @@ server {
|
|||||||
index index.html index.htm;
|
index index.html index.htm;
|
||||||
}
|
}
|
||||||
|
|
||||||
# location /api/v1/proxies {
|
|
||||||
# resolver 10.43.0.10 valid=10s; # 6.6.6.6 为自建DNS
|
|
||||||
# proxy_pass http://ht-watcher:8080;
|
|
||||||
# }
|
|
||||||
#
|
|
||||||
# location /api/v1/pushers {
|
|
||||||
# resolver 10.43.0.10 valid=10s; # 6.6.6.6 为自建DNS
|
|
||||||
# proxy_pass http://pusher:8080;
|
|
||||||
# }
|
|
||||||
#
|
|
||||||
# location /api/v1/push {
|
|
||||||
# resolver 10.43.0.10 valid=10s; # 6.6.6.6 为自建DNS
|
|
||||||
# proxy_pass http://pusher:8080;
|
|
||||||
# }
|
|
||||||
#
|
|
||||||
# location /api/v1/watchers {
|
|
||||||
# resolver 10.43.0.10 valid=10s; # 6.6.6.6 为自建DNS
|
|
||||||
# proxy_pass http://ht-watcher:8080;
|
|
||||||
# }
|
|
||||||
#
|
|
||||||
# location /api/v1/spider{
|
|
||||||
# resolver 10.43.0.10 valid=10s; # 6.6.6.6 为自建DNS
|
|
||||||
# proxy_pass http://product-spider:8080;
|
|
||||||
# }
|
|
||||||
#
|
|
||||||
# location /api/v1/products {
|
|
||||||
# resolver 10.43.0.10 valid=10s; # 6.6.6.6 为自建DNS
|
|
||||||
# proxy_pass http://product-backend:8080;
|
|
||||||
# }
|
|
||||||
|
|
||||||
error_page 500 502 503 504 /50x.html;
|
error_page 500 502 503 504 /50x.html;
|
||||||
location = /50x.html {
|
location = /50x.html {
|
||||||
root /usr/share/nginx/html;
|
root /usr/share/nginx/html;
|
||||||
|
@ -19,5 +19,5 @@ export const UpdateProduct=(p)=>{
|
|||||||
}
|
}
|
||||||
|
|
||||||
export const GetProduct = (pid) => {
|
export const GetProduct = (pid) => {
|
||||||
return product.get(`p/${pid}`)
|
return product.get(`p/${encodeURIComponent(pid)}`)
|
||||||
}
|
}
|
@ -22,41 +22,41 @@ export default defineConfig({
|
|||||||
server:{
|
server:{
|
||||||
open: true,
|
open: true,
|
||||||
proxy: {
|
proxy: {
|
||||||
'/api/v1/products': {
|
// '/api/v1/products': {
|
||||||
// target: 'https://ht.timerzz.com:20443/',
|
// // target: 'https://ht.timerzz.com:20443/',
|
||||||
target: 'http://192.168.31.163:31828/',
|
// target: 'http://192.168.31.163:31828/',
|
||||||
changeOrigin: true,
|
// changeOrigin: true,
|
||||||
secure: false,
|
// secure: false,
|
||||||
ws: true,
|
// ws: true,
|
||||||
},
|
// },
|
||||||
'/api/v1/push': {
|
// '/api/v1/push': {
|
||||||
target: 'https://ht-dev.timerzz.com:20443/',
|
// target: 'https://ht-dev.timerzz.com:20443/',
|
||||||
// target: 'http://192.168.31.55:2280/',
|
// // target: 'http://192.168.31.55:2280/',
|
||||||
changeOrigin: true,
|
// changeOrigin: true,
|
||||||
secure: false,
|
// secure: false,
|
||||||
ws: true,
|
// ws: true,
|
||||||
},
|
// },
|
||||||
'/api/v1/pushers': {
|
// '/api/v1/pushers': {
|
||||||
target: 'https://ht-dev.timerzz.com:20443/',
|
// target: 'https://ht-dev.timerzz.com:20443/',
|
||||||
// target: 'http://192.168.31.55:2280/',
|
// // target: 'http://192.168.31.55:2280/',
|
||||||
changeOrigin: true,
|
// changeOrigin: true,
|
||||||
secure: false,
|
// secure: false,
|
||||||
ws: true,
|
// ws: true,
|
||||||
},
|
// },
|
||||||
'/api/v1/watchers': {
|
// '/api/v1/watchers': {
|
||||||
target: 'https://ht-dev.timerzz.com:20443/',
|
// target: 'https://ht-dev.timerzz.com:20443/',
|
||||||
// target: 'http://192.168.31.55:2280/',
|
// // target: 'http://192.168.31.55:2280/',
|
||||||
changeOrigin: true,
|
// changeOrigin: true,
|
||||||
secure: false,
|
// secure: false,
|
||||||
ws: true,
|
// ws: true,
|
||||||
},
|
// },
|
||||||
'/api/v1/proxies': {
|
// '/api/v1/proxies': {
|
||||||
target: 'https://ht-dev.timerzz.com:20443/',
|
// target: 'https://ht-dev.timerzz.com:20443/',
|
||||||
// target: 'http://192.168.31.55:2280/',
|
// // target: 'http://192.168.31.55:2280/',
|
||||||
changeOrigin: true,
|
// changeOrigin: true,
|
||||||
secure: false,
|
// secure: false,
|
||||||
ws: true,
|
// ws: true,
|
||||||
},
|
// },
|
||||||
'/api/v1': {
|
'/api/v1': {
|
||||||
target: 'https://ht.timerzz.com:20443/',
|
target: 'https://ht.timerzz.com:20443/',
|
||||||
// target: 'http://192.168.31.55:2280/',
|
// target: 'http://192.168.31.55:2280/',
|
||||||
|
Loading…
Reference in New Issue
Block a user