提供独立路径的国内PDA测试H5部署
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
ARG NGINX_BASE_IMAGE=nginx:1.27-alpine
|
||||
FROM ${NGINX_BASE_IMAGE}
|
||||
COPY deploy/nginx.conf /etc/nginx/conf.d/default.conf
|
||||
COPY unpackage/dist/build/web/ /srv/pda-h5/pda-domestic/
|
||||
EXPOSE 80
|
||||
@@ -0,0 +1,27 @@
|
||||
name: firstleg-test-pda-domestic-h5
|
||||
services:
|
||||
pda-domestic-h5:
|
||||
build:
|
||||
context: ..
|
||||
dockerfile: deploy/Dockerfile.h5
|
||||
args:
|
||||
NGINX_BASE_IMAGE: "${NGINX_BASE_IMAGE:-nginx:1.27-alpine}"
|
||||
image: pda-domestic-h5-test:${IMAGE_TAG:?IMAGE_TAG is required}
|
||||
container_name: pda-domestic-h5-test
|
||||
restart: unless-stopped
|
||||
expose:
|
||||
- "80"
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "wget -qO /dev/null http://127.0.0.1/healthz && wget -qO /dev/null http://127.0.0.1/pda-domestic/"]
|
||||
interval: 5s
|
||||
timeout: 3s
|
||||
retries: 12
|
||||
start_period: 5s
|
||||
networks:
|
||||
test-backend:
|
||||
aliases:
|
||||
- pda-domestic-h5-test
|
||||
networks:
|
||||
test-backend:
|
||||
external: true
|
||||
name: firstleg-test-network
|
||||
@@ -0,0 +1,18 @@
|
||||
server {
|
||||
listen 80;
|
||||
server_name _;
|
||||
root /srv/pda-h5;
|
||||
|
||||
location = /healthz {
|
||||
default_type text/plain;
|
||||
add_header Cache-Control "no-store" always;
|
||||
return 200 "ok\n";
|
||||
}
|
||||
location = /pda-domestic { return 302 /pda-domestic/; }
|
||||
location ^~ /pda-domestic/ {
|
||||
index index.html;
|
||||
try_files $uri $uri/ =404;
|
||||
add_header Cache-Control "no-store" always;
|
||||
}
|
||||
location / { return 404; }
|
||||
}
|
||||
Reference in New Issue
Block a user