10 Commits

Author SHA1 Message Date
3ba6b3a1cd fix: 還原 compose.demo.yaml 的 port 映射為 80:80 + 8080:8080
Some checks failed
ERP-Deploy-Demo / deploy-demo (push) Failing after 40s
ERP-Deploy-Production / deploy-production (push) Successful in 59s
2026-02-23 17:35:37 +08:00
ec239279f4 fix: 修正 Demo 環境 port 映射,避免特權端口權限錯誤
Some checks failed
ERP-Deploy-Demo / deploy-demo (push) Failing after 29s
ERP-Deploy-Production / deploy-production (push) Successful in 1m14s
Demo 主機的 Docker 沒有綁定特權端口 (80) 的權限,
將映射從 80:80 改為 8080:80(主機 8080 → 容器 Nginx 80)。
2026-02-23 17:27:59 +08:00
e2c36e9c0f chore: 推送當前部署與配置修改到所有分支
Some checks failed
ERP-Deploy-Demo / deploy-demo (push) Failing after 25s
ERP-Deploy-Production / deploy-production (push) Successful in 1m9s
2026-02-23 17:25:40 +08:00
30bf8ef79c fix: 解決部署初期因缺少 vendor 導致容器啟動崩潰的問題
Some checks failed
ERP-Deploy-Demo / deploy-demo (push) Failing after 32s
ERP-Deploy-Production / deploy-production (push) Successful in 59s
2026-02-23 17:23:53 +08:00
590d1ea9e9 fix: 移除 compose.yaml 中重複的鍵值
Some checks failed
ERP-Deploy-Demo / deploy-demo (push) Failing after 41s
ERP-Deploy-Production / deploy-production (push) Successful in 1m4s
2026-02-23 17:20:58 +08:00
cd0f454c98 refactor: 根據環境資訊還原容器名稱並維持多檔案 Compose 結構
Some checks failed
ERP-Deploy-Production / deploy-production (push) Has been cancelled
ERP-Deploy-Demo / deploy-demo (push) Has been cancelled
2026-02-23 17:20:44 +08:00
54e1e5df5a fix: 隔離正式與 Demo 環境的容器名稱以修復 CI/CD 衝突
Some checks failed
ERP-Deploy-Demo / deploy-demo (push) Failing after 26s
2026-02-23 17:17:07 +08:00
8e3d951d0d feat: 為 demo 環境增加 80 埠口對應
Some checks failed
ERP-Deploy-Production / deploy-production (push) Successful in 57s
ERP-Deploy-Demo / deploy-demo (push) Failing after 51s
2026-02-23 17:12:43 +08:00
d04e5bbffb docs: 修正 demo-proxy.conf 中的環境註解文字
Some checks failed
ERP-Deploy-Demo / deploy-demo (push) Failing after 26s
2026-02-23 17:12:20 +08:00
27273bfee4 fix: 更新 demo-proxy.conf 以符合正式環境配置並優化 SSL 轉發
Some checks failed
ERP-Deploy-Demo / deploy-demo (push) Has been cancelled
2026-02-23 17:11:58 +08:00
3 changed files with 17 additions and 23 deletions

View File

@@ -1,6 +1,7 @@
services: services:
proxy: proxy:
ports: ports:
- '80:80'
- '8080:8080' - '8080:8080'
volumes: volumes:
- './nginx/demo-proxy.conf:/etc/nginx/conf.d/default.conf:ro' - './nginx/demo-proxy.conf:/etc/nginx/conf.d/default.conf:ro'

View File

@@ -6,8 +6,8 @@ services:
args: args:
WWWGROUP: '${WWWGROUP}' WWWGROUP: '${WWWGROUP}'
image: 'sail-8.5/app' image: 'sail-8.5/app'
container_name: star-erp-laravel container_name: laravel
hostname: star-erp-laravel hostname: laravel
extra_hosts: extra_hosts:
- 'host.docker.internal:host-gateway' - 'host.docker.internal:host-gateway'
ports: ports:
@@ -29,8 +29,8 @@ services:
# - mailpit # - mailpit
mysql: mysql:
image: 'mysql/mysql-server:8.0' image: 'mysql/mysql-server:8.0'
container_name: star-erp-mysql container_name: mysql
hostname: star-erp-mysql hostname: mysql
ports: ports:
- '${FORWARD_DB_PORT:-3306}:3306' - '${FORWARD_DB_PORT:-3306}:3306'
environment: environment:
@@ -56,8 +56,8 @@ services:
timeout: 5s timeout: 5s
redis: redis:
image: 'redis:alpine' image: 'redis:alpine'
container_name: star-erp-redis container_name: redis
hostname: star-erp-redis hostname: redis
# ports: # ports:
# - '${FORWARD_REDIS_PORT:-6379}:6379' # - '${FORWARD_REDIS_PORT:-6379}:6379'
volumes: volumes:

View File

@@ -1,29 +1,22 @@
# 總後台 (landlord) - 端口 8080 # Demo 環境 (Demo) - 端口 80
server { # 外部 SSL 終止後(如 Cloudflare/NPM轉發至此端口
listen 8080;
server_name _;
location / { # 定義 map 以正確處理 X-Forwarded-Proto
proxy_pass http://star-erp-laravel:8080; map $http_x_forwarded_proto $proxy_x_forwarded_proto {
proxy_set_header Host star-erp.demo; default $http_x_forwarded_proto;
proxy_set_header X-Real-IP $remote_addr; '' $scheme;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Host $host:$server_port;
}
} }
# koori 租戶 - 端口 8081
server { server {
listen 8081; listen 80;
server_name _; server_name demo-erp.taiwan-star.com.tw;
location / { location / {
proxy_pass http://star-erp-laravel:8080; proxy_pass http://star-erp-laravel:8080;
proxy_set_header Host $host; proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header X-Forwarded-Proto $proxy_x_forwarded_proto;
proxy_set_header X-Forwarded-Host $host:$server_port; proxy_set_header X-Forwarded-Host $host;
} }
} }