Merge pull request '[MR]Modified name' (#8) from develop into main
Deploy Main / deploy-main (push) Successful in 7s
Deploy Main / deploy-main (push) Successful in 7s
Reviewed-on: #8
This commit was merged in pull request #8.
This commit is contained in:
@@ -7,7 +7,7 @@ on:
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
DEPLOY_DIR: /volume1/09_container_manager/14_error-page
|
||||
DEPLOY_DIR: /volume1/09_container_manager/14_gateway
|
||||
|
||||
jobs:
|
||||
deploy-main:
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
# error-page
|
||||
# gateway
|
||||
|
||||
`*.takits.me`가 컨테이너 다운(502/503/504)이거나 앱이 404/500을 줄 때, DSM 기본 에러창 대신 쓰는 공통 nginx.
|
||||
`*.takits.me`가 컨테이너 다운(502/503/504)이거나 앱이 404/500을 줄 때, DSM 기본 에러창 대신 쓰는 공통 nginx 게이트웨이입니다.
|
||||
|
||||
DSM 리버스 프록시가 **앱 포트에 직접** 붙으면, 그 포트가 닫혀 있을 때 나스가 에러 페이지를 그립니다. 이 컨테이너는 항상 `127.0.0.1:4098`에서 떠 있고, `Host`로 실제 앱에 넘긴 뒤 업스트림이 죽었을 때만 공통 페이지를 보여 줍니다.
|
||||
|
||||
```
|
||||
브라우저 → DSM RP (HTTPS) → 127.0.0.1:4098 (error-page)
|
||||
브라우저 → DSM RP (HTTPS) → 127.0.0.1:4098 (gateway)
|
||||
└─ Host가 takits.me 이면 127.0.0.1:4889
|
||||
```
|
||||
|
||||
@@ -16,13 +16,13 @@ DSM 리버스 프록시가 **앱 포트에 직접** 붙으면, 그 포트가 닫
|
||||
`develop`에서 작업한 뒤 `main`에 머지하면 Gitea Actions가 아래 경로로 파일을 동기화하고 컨테이너를 재생성합니다.
|
||||
|
||||
```text
|
||||
/volume1/09_container_manager/14_error-page
|
||||
/volume1/09_container_manager/14_gateway
|
||||
```
|
||||
|
||||
수동 실행:
|
||||
|
||||
```bash
|
||||
cd /volume1/09_container_manager/14_error-page
|
||||
cd /volume1/09_container_manager/14_gateway
|
||||
docker compose up -d
|
||||
```
|
||||
|
||||
@@ -47,7 +47,7 @@ curl -sI -H "Host: unknown.takits.me" http://127.0.0.1:4098/
|
||||
한 줄 추가 후:
|
||||
|
||||
```bash
|
||||
docker exec error-page nginx -s reload
|
||||
docker exec gateway nginx -s reload
|
||||
```
|
||||
|
||||
와일드카드 `*.takits.me` → `127.0.0.1:4098` 한 규칙으로 모아도 됩니다. 맵에 없는 호스트는 공통 에러 페이지가 뜹니다.
|
||||
|
||||
+3
-3
@@ -1,9 +1,9 @@
|
||||
name: error-page
|
||||
name: gateway
|
||||
|
||||
services:
|
||||
error-page:
|
||||
gateway:
|
||||
image: nginx:alpine
|
||||
container_name: error-page
|
||||
container_name: gateway
|
||||
restart: unless-stopped
|
||||
# Reach 127.0.0.1-bound app ports on the NAS (DSM reverse proxy style).
|
||||
network_mode: host
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
# Host → published port on the NAS (the destination already used in DSM reverse proxy).
|
||||
# 0 = unknown host → custom error page.
|
||||
#
|
||||
# After adding a line, reload: docker exec error-page nginx -s reload
|
||||
# After adding a line, reload: docker exec gateway nginx -s reload
|
||||
# Then point that host's DSM reverse proxy to 127.0.0.1:4098 (not the app port).
|
||||
|
||||
map $host $app_port {
|
||||
|
||||
Reference in New Issue
Block a user