외부 ip 로 api 호출 전환
This commit is contained in:
parent
c78b239db2
commit
103dd9907d
|
|
@ -5,20 +5,17 @@ services:
|
|||
context: ../../backend-node
|
||||
dockerfile: ../docker/prod/backend.Dockerfile # 운영용 Dockerfile
|
||||
container_name: pms-backend-prod
|
||||
ports:
|
||||
- "8080:8080"
|
||||
network_mode: "host" # 호스트 네트워크 모드
|
||||
environment:
|
||||
- NODE_ENV=production
|
||||
- PORT=8080
|
||||
- HOST=0.0.0.0 # 모든 인터페이스에서 바인딩
|
||||
- DATABASE_URL=postgresql://postgres:ph0909!!@39.117.244.52:11132/plm
|
||||
- JWT_SECRET=ilshin-plm-super-secret-jwt-key-2024
|
||||
- JWT_EXPIRES_IN=24h
|
||||
- CORS_ORIGIN=http://192.168.0.70:5555,http://39.117.244.52:5555
|
||||
- CORS_CREDENTIALS=true
|
||||
- LOG_LEVEL=info
|
||||
# 운영용에서는 볼륨 마운트 없음 (보안상 이유)
|
||||
networks:
|
||||
- pms-network
|
||||
restart: unless-stopped
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://localhost:8080/health"]
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
import axios, { AxiosResponse, AxiosError } from "axios";
|
||||
|
||||
// API 기본 URL 설정 - 모든 접근에서 내부 IP 사용 (Option B)
|
||||
export const API_BASE_URL = "http://192.168.0.70:8080/api";
|
||||
export const API_BASE_URL = "http://39.117.244.52:8080/api";
|
||||
|
||||
// JWT 토큰 관리 유틸리티
|
||||
const TokenManager = {
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ const nextConfig = {
|
|||
|
||||
// 환경 변수 (런타임에 읽기) - 내부 IP로 통일
|
||||
env: {
|
||||
NEXT_PUBLIC_API_URL: process.env.NEXT_PUBLIC_API_URL || "http://192.168.0.70:8080/api",
|
||||
NEXT_PUBLIC_API_URL: process.env.NEXT_PUBLIC_API_URL || "http://39.117.244.52:8080/api",
|
||||
},
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue