스테이지용 변수 수정: stage-chocoadmin -> chocoadmin-stage
This commit is contained in:
+8
-8
@@ -16,8 +16,8 @@ Stage example:
|
||||
DATABASE_URL="mysql://USER:PASSWORD@mariadb.jisangs.com:30001/chocomae"
|
||||
AUTH_SECRET="replace-with-stage-secret"
|
||||
NEXTAUTH_SECRET="replace-with-stage-secret"
|
||||
AUTH_URL="https://stage-chocoadmin.jinaju.com"
|
||||
NEXTAUTH_URL="https://stage-chocoadmin.jinaju.com"
|
||||
AUTH_URL="https://chocoadmin-stage.jisangs.com"
|
||||
NEXTAUTH_URL="https://chocoadmin-stage.jisangs.com"
|
||||
```
|
||||
|
||||
Production file path:
|
||||
@@ -53,11 +53,11 @@ openssl rand -base64 32
|
||||
Both production and stage share the same Git checkout at `/volume1/docker/service/jinaju/chocoadmin`. Pull from there:
|
||||
|
||||
```bash
|
||||
cd /volume1/docker/service/jinaju/stage-chocoadmin
|
||||
cd /volume1/docker/service/jinaju/chocoadmin-stage
|
||||
git pull --ff-only
|
||||
```
|
||||
|
||||
Stage uses `docker-compose.stage.yml`, the `stage-chocoadmin` container, and the external Docker network `proxy-network`.
|
||||
Stage uses `docker-compose.stage.yml`, the `chocoadmin-stage` container, and the external Docker network `proxy-network`.
|
||||
|
||||
Verify or create the network:
|
||||
|
||||
@@ -86,7 +86,7 @@ docker exec npm nginx -s reload
|
||||
Nginx Proxy Manager settings:
|
||||
|
||||
- Scheme: `http`
|
||||
- Forward Hostname / IP: `stage-chocoadmin`
|
||||
- Forward Hostname / IP: `chocoadmin-stage`
|
||||
- Forward Port: `3000`
|
||||
- Websockets Support: enabled
|
||||
- SSL: enabled
|
||||
@@ -95,7 +95,7 @@ Nginx Proxy Manager settings:
|
||||
Stage URL:
|
||||
|
||||
```text
|
||||
https://stage-chocoadmin.jinaju.com
|
||||
https://chocoadmin-stage.jisangs.com
|
||||
```
|
||||
|
||||
After changing `AUTH_URL`, `NEXTAUTH_URL`, or cookie-related settings, clear browser cookies for the stage domain or test in a private window.
|
||||
@@ -198,9 +198,9 @@ Check the network:
|
||||
docker network inspect proxy-network --format '{{range .Containers}}{{.Name}} {{.IPv4Address}}{{"\n"}}{{end}}'
|
||||
```
|
||||
|
||||
Expected: `chocoadmin` and `stage-chocoadmin` appear with different IPs. If `chocoadmin` appears twice, a stale container is using that alias.
|
||||
Expected: `chocoadmin` and `chocoadmin-stage` appear with different IPs. If `chocoadmin` appears twice, a stale container is using that alias.
|
||||
|
||||
Fix: ensure `docker-compose.stage.yml` has `services: stage-chocoadmin:` (not `chocoadmin`), redeploy stage once with `--remove-orphans` to clean up the stale container, then reload NPM.
|
||||
Fix: ensure `docker-compose.stage.yml` has `services: chocoadmin-stage:` (not `chocoadmin`), redeploy stage once with `--remove-orphans` to clean up the stale container, then reload NPM.
|
||||
|
||||
### Failed to find Server Action after redeployment
|
||||
|
||||
|
||||
@@ -70,7 +70,7 @@ pnpm db:check
|
||||
스테이지 도메인에서 비로그인 상태 또는 시크릿 창으로 확인한다.
|
||||
|
||||
```bash
|
||||
curl -I https://stage-chocoadmin.jinaju.com/maestros
|
||||
curl -I https://chocoadmin-stage.jisangs.com/maestros
|
||||
```
|
||||
|
||||
기대 결과:
|
||||
@@ -81,7 +81,7 @@ curl -I https://stage-chocoadmin.jinaju.com/maestros
|
||||
|
||||
브라우저에서 확인한다.
|
||||
|
||||
- `https://stage-chocoadmin.jinaju.com/login`
|
||||
- `https://chocoadmin-stage.jisangs.com/login`
|
||||
- `/maestros`
|
||||
- `/extension-requests`
|
||||
- `/upgrade-requests`
|
||||
@@ -119,7 +119,7 @@ curl -I https://stage-chocoadmin.jinaju.com/maestros
|
||||
NAS에서 실행한다.
|
||||
|
||||
```bash
|
||||
cd /volume1/docker/service/jinaju/stage-chocoadmin
|
||||
cd /volume1/docker/service/jisangs/chocoadmin-stage
|
||||
docker compose -f docker-compose.stage.yml restart
|
||||
docker compose -f docker-compose.stage.yml ps
|
||||
docker compose -f docker-compose.stage.yml logs --tail=100
|
||||
@@ -127,7 +127,7 @@ docker compose -f docker-compose.stage.yml logs --tail=100
|
||||
|
||||
기대 결과:
|
||||
|
||||
- `stage-chocoadmin` 컨테이너가 `Up` 상태다.
|
||||
- `chocoadmin-stage` 컨테이너가 `Up` 상태다.
|
||||
- 로그에 Next.js ready 메시지가 출력된다.
|
||||
- 브라우저에서 로그인과 주요 목록 화면이 정상 동작한다.
|
||||
|
||||
|
||||
@@ -570,7 +570,7 @@ chocoadmin/
|
||||
- [x] **포트 충돌 수정** (`docker-compose.yml`)
|
||||
- Gitea가 호스트 3000 포트를 선점 → `ports: "3000:3000"` → `expose: "3000"` 으로 변경
|
||||
- [x] **Docker DNS alias 충돌 수정** (`docker-compose.stage.yml`)
|
||||
- `services: chocoadmin:` → `services: stage-chocoadmin:` 으로 변경
|
||||
- `services: chocoadmin:` → `services: chocoadmin-stage:` 으로 변경
|
||||
- 동일 서비스명은 `proxy-network`에서 같은 DNS alias로 등록됨
|
||||
- NPM의 `set $server "chocoadmin"` 이 두 컨테이너에 라운드로빈 → 트래픽이 production/stage 사이에 무작위 분산
|
||||
- [x] **NextAuth v5 커스텀 쿠키 이름으로 production/stage 쿠키 분리**
|
||||
|
||||
Reference in New Issue
Block a user