feature/0701 #1
@@ -66,9 +66,9 @@ steps:
|
|||||||
if docker compose -p "$PROJECT_NAME" config --services | grep -q "^$svc$"; then
|
if docker compose -p "$PROJECT_NAME" config --services | grep -q "^$svc$"; then
|
||||||
echo ">>>>>> 开始增量构建部署服务: $svc <<<<<<"
|
echo ">>>>>> 开始增量构建部署服务: $svc <<<<<<"
|
||||||
cp /bluetti/frontend_project/bluetti-shop-configs/"$svc"-development.env apps/$svc/.env.development
|
cp /bluetti/frontend_project/bluetti-shop-configs/"$svc"-development.env apps/$svc/.env.development
|
||||||
docker compose -p "$PROJECT_NAME" up -d "$svc" --build
|
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
docker compose --parallel 8 -p "$PROJECT_NAME" up -d --build $build_list
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
- name: pnpm_store
|
- name: pnpm_store
|
||||||
@@ -106,7 +106,7 @@ type: docker
|
|||||||
name: TEST-frontend-monorepo-ci
|
name: TEST-frontend-monorepo-ci
|
||||||
|
|
||||||
clone:
|
clone:
|
||||||
depth: 50
|
depth: 22
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: build-and-run-apps
|
- name: build-and-run-apps
|
||||||
@@ -204,7 +204,7 @@ type: docker
|
|||||||
name: RC-frontend-monorepo-ci
|
name: RC-frontend-monorepo-ci
|
||||||
|
|
||||||
clone:
|
clone:
|
||||||
depth: 50
|
depth: 22
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: build-and-push-apps
|
- name: build-and-push-apps
|
||||||
@@ -365,7 +365,7 @@ type: docker
|
|||||||
name: PROD-frontend-monorepo-ci
|
name: PROD-frontend-monorepo-ci
|
||||||
|
|
||||||
clone:
|
clone:
|
||||||
depth: 50
|
depth: 22
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: build-and-push-apps
|
- name: build-and-push-apps
|
||||||
|
|||||||
@@ -1,63 +1,111 @@
|
|||||||
services:
|
services:
|
||||||
shopify-america:
|
shopify-america:
|
||||||
build:
|
image: harbor.bluettipower.com/bluetti-frontend/shopify-america:${COMMIT_SHA}
|
||||||
context: .
|
container_name: shopify-america
|
||||||
dockerfile: apps/shopify-america/Dockerfile
|
restart: unless-stopped
|
||||||
image: shopify-america:test
|
user: "0:0"
|
||||||
container_name: shopify-america-test
|
|
||||||
restart: always
|
|
||||||
ports:
|
|
||||||
- '3032:3002'
|
|
||||||
labels:
|
labels:
|
||||||
- traefik.http.routers.shoptestqaus.rule=Host(`shop-test-us.bluettipower.com`)
|
- traefik.http.routers.shopus-http.rule=Host(`shop-rc-us.bluettipower.com`)
|
||||||
- traefik.http.routers.shoptestqaus.middlewares=shoptestqaus-cors
|
- traefik.http.routers.shopus-http.entrypoints=http
|
||||||
- traefik.http.middlewares.shoptestqaus-cors.headers.accesscontrolallowmethods=*
|
|
||||||
- traefik.http.middlewares.shoptestqaus-cors.headers.accesscontrolallowheaders=*
|
- traefik.enable=true
|
||||||
- traefik.http.middlewares.shoptestqaus-cors.headers.accesscontrolalloworiginlist=*
|
- traefik.http.routers.shopus-https.rule=Host(`shop-rc-us.bluettipower.com`)
|
||||||
- traefik.http.middlewares.shoptestqaus-redirect.redirectscheme.scheme=https
|
- traefik.http.routers.shopus-https.entrypoints=https
|
||||||
- traefik.http.middlewares.shoptestqaus-redirect.redirectscheme.permanent=true
|
- traefik.http.routers.shopus-https.tls=true
|
||||||
- traefik.http.services.shoptestqaus.loadbalancer.server.port=3002
|
- traefik.http.routers.shopus-https.tls.certresolver=myresolver
|
||||||
- traefik.http.routers.shoptestqaus.tls=true
|
- traefik.http.routers.shopus-https.middlewares=shopus-cors
|
||||||
- traefik.http.routers.shoptestqaus.tls.certresolver=myresolver
|
- traefik.http.services.shopus.loadbalancer.server.port=3002
|
||||||
|
|
||||||
|
- traefik.http.middlewares.shopus-cors.headers.accesscontrolallowmethods=*
|
||||||
|
- traefik.http.middlewares.shopus-cors.headers.accesscontrolallowheaders=*
|
||||||
|
- traefik.http.middlewares.shopus-cors.headers.accesscontrolalloworiginlist=*
|
||||||
|
- traefik.http.middlewares.shopus-redirect.redirectscheme.scheme=https
|
||||||
|
- traefik.http.middlewares.shopus-redirect.redirectscheme.permanent=true
|
||||||
networks:
|
networks:
|
||||||
- traefik
|
- traefik
|
||||||
env_file:
|
env_file:
|
||||||
- apps/shopify-america/.env.test
|
- /bluetti/frontend_project/bluetti-shop-configs/shopify-america-production.env
|
||||||
logging:
|
logging:
|
||||||
driver: json-file
|
driver: json-file
|
||||||
options:
|
options:
|
||||||
max-size: '10m'
|
max-size: '10m'
|
||||||
max-file: '3'
|
max-file: '3'
|
||||||
|
command: sh -c "npm start 2>&1 | tee -a /app/logs/app.log"
|
||||||
|
volumes:
|
||||||
|
- /var/log/shopify-america:/app/logs:rw
|
||||||
|
|
||||||
|
|
||||||
shopify-australia:
|
shopify-australia:
|
||||||
build:
|
image: harbor.bluettipower.com/bluetti-frontend/shopify-australia:${COMMIT_SHA}
|
||||||
context: .
|
container_name: shopify-australia
|
||||||
dockerfile: apps/shopify-australia/Dockerfile
|
restart: unless-stopped
|
||||||
image: shopify-australia:test
|
user: "0:0"
|
||||||
container_name: shopify-australia-test
|
|
||||||
restart: always
|
|
||||||
ports:
|
|
||||||
- '3031:3001'
|
|
||||||
labels:
|
labels:
|
||||||
- traefik.http.routers.shoptestqaau.rule=Host(`shop-test-au.bluettipower.com`)
|
# 移除 http 跳转相关的 middleware,即不要为 http 路由配置 redirectscheme
|
||||||
- traefik.http.routers.shoptestqaau.middlewares=shoptestqaau-cors
|
- traefik.http.routers.shopau-http.rule=Host(`shop-rc-au.bluettipower.com`)
|
||||||
- traefik.http.middlewares.shoptestqaau-cors.headers.accesscontrolallowmethods=*
|
- traefik.http.routers.shopau-http.entrypoints=http
|
||||||
- traefik.http.middlewares.shoptestqaau-cors.headers.accesscontrolallowheaders=*
|
|
||||||
- traefik.http.middlewares.shoptestqaau-cors.headers.accesscontrolalloworiginlist=*
|
- traefik.enable=true
|
||||||
- traefik.http.middlewares.shoptestqaau-redirect.redirectscheme.scheme=https
|
- traefik.http.routers.shopau-https.rule=Host(`shop-rc-au.bluettipower.com`)
|
||||||
- traefik.http.middlewares.shoptestqaau-redirect.redirectscheme.permanent=true
|
- traefik.http.routers.shopau-https.entrypoints=https
|
||||||
- traefik.http.services.shoptestqaau.loadbalancer.server.port=3001
|
- traefik.http.routers.shopau-https.tls=true
|
||||||
- traefik.http.routers.shoptestqaau.tls=true
|
- traefik.http.routers.shopau-https.tls.certresolver=myresolver
|
||||||
- traefik.http.routers.shoptestqaau.tls.certresolver=myresolver
|
- traefik.http.routers.shopau-https.middlewares=shopau-cors
|
||||||
|
- traefik.http.services.shopau.loadbalancer.server.port=3001
|
||||||
|
|
||||||
|
- traefik.http.middlewares.shopau-cors.headers.accesscontrolallowmethods=*
|
||||||
|
- traefik.http.middlewares.shopau-cors.headers.accesscontrolallowheaders=*
|
||||||
|
- traefik.http.middlewares.shopau-cors.headers.accesscontrolalloworiginlist=*
|
||||||
|
- traefik.http.middlewares.shopau-redirect.redirectscheme.scheme=https
|
||||||
|
- traefik.http.middlewares.shopau-redirect.redirectscheme.permanent=true
|
||||||
networks:
|
networks:
|
||||||
- traefik
|
- traefik
|
||||||
env_file:
|
env_file:
|
||||||
- apps/shopify-australia/.env.test
|
- /bluetti/frontend_project/bluetti-shop-configs/shopify-australia-production.env
|
||||||
logging:
|
logging:
|
||||||
driver: json-file
|
driver: json-file
|
||||||
options:
|
options:
|
||||||
max-size: '10m'
|
max-size: '10m'
|
||||||
max-file: '3'
|
max-file: '3'
|
||||||
|
command: sh -c "npm start 2>&1 | tee -a /app/logs/app.log"
|
||||||
|
volumes:
|
||||||
|
- /var/log/shopify-australia:/app/logs:rw
|
||||||
|
|
||||||
|
shopify-europe:
|
||||||
|
image: harbor.bluettipower.com/bluetti-frontend/shopify-europe:${COMMIT_SHA}
|
||||||
|
container_name: shopify-europe
|
||||||
|
restart: unless-stopped
|
||||||
|
user: "0:0"
|
||||||
|
labels:
|
||||||
|
# 移除 http 跳转相关的 middleware,即不要为 http 路由配置 redirectscheme
|
||||||
|
- traefik.http.routers.shopeu-http.rule=Host(`shop-rc-eu.bluettipower.com`)
|
||||||
|
- traefik.http.routers.shopeu-http.entrypoints=http
|
||||||
|
|
||||||
|
- traefik.enable=true
|
||||||
|
- traefik.http.routers.shopeu-https.rule=Host(`shop-rc-eu.bluettipower.com`)
|
||||||
|
- traefik.http.routers.shopeu-https.entrypoints=https
|
||||||
|
- traefik.http.routers.shopeu-https.tls=true
|
||||||
|
- traefik.http.routers.shopeu-https.tls.certresolver=myresolver
|
||||||
|
- traefik.http.routers.shopeu-https.middlewares=shopeu-cors
|
||||||
|
- traefik.http.services.shopeu.loadbalancer.server.port=3005
|
||||||
|
|
||||||
|
- traefik.http.middlewares.shopeu-cors.headers.accesscontrolallowmethods=*
|
||||||
|
- traefik.http.middlewares.shopeu-cors.headers.accesscontrolallowheaders=*
|
||||||
|
- traefik.http.middlewares.shopeu-cors.headers.accesscontrolalloworiginlist=*
|
||||||
|
- traefik.http.middlewares.shopeu-redirect.redirectscheme.scheme=https
|
||||||
|
- traefik.http.middlewares.shopeu-redirect.redirectscheme.permanent=true
|
||||||
|
networks:
|
||||||
|
- traefik
|
||||||
|
env_file:
|
||||||
|
- /bluetti/frontend_project/bluetti-shop-configs/shopify-europe-production.env
|
||||||
|
logging:
|
||||||
|
driver: json-file
|
||||||
|
options:
|
||||||
|
max-size: '10m'
|
||||||
|
max-file: '3'
|
||||||
|
command: sh -c "npm start 2>&1 | tee -a /app/logs/app.log"
|
||||||
|
volumes:
|
||||||
|
- /var/log/shopify-europe:/app/logs:rw
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
traefik:
|
traefik:
|
||||||
|
|||||||
Reference in New Issue
Block a user