해당 서비스 도커화 성공, 룰 추가, 로그인 오류 수정, 소문자 룰 어느정도 해결
This commit is contained in:
11
web-ui/Dockerfile
Normal file
11
web-ui/Dockerfile
Normal file
@@ -0,0 +1,11 @@
|
||||
FROM nginx:alpine
|
||||
|
||||
# 정적 파일 복사
|
||||
COPY . /usr/share/nginx/html/
|
||||
|
||||
# Nginx 설정 파일 복사 (선택사항)
|
||||
# COPY nginx.conf /etc/nginx/conf.d/default.conf
|
||||
|
||||
EXPOSE 80
|
||||
|
||||
CMD ["nginx", "-g", "daemon off;"]
|
||||
19
web-ui/docker-compose.yml
Normal file
19
web-ui/docker-compose.yml
Normal file
@@ -0,0 +1,19 @@
|
||||
version: "3.8"
|
||||
|
||||
services:
|
||||
web:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
container_name: web_hyungi_dev
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "20000:80"
|
||||
volumes:
|
||||
- .:/usr/share/nginx/html:ro
|
||||
networks:
|
||||
- hyungi_network
|
||||
|
||||
networks:
|
||||
hyungi_network:
|
||||
external: true
|
||||
BIN
web-ui/img/favicon.png
Normal file
BIN
web-ui/img/favicon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 15 KiB |
@@ -13,10 +13,8 @@ function getApiBaseUrl() {
|
||||
hostname === 'localhost' || hostname === '127.0.0.1' ||
|
||||
hostname.includes('.local') || hostname.includes('hyungi')) {
|
||||
|
||||
// 현재 웹서버의 도메인/IP를 그대로 사용하되 /api 경로만 추가
|
||||
const baseUrl = port && port !== '80' && port !== '443'
|
||||
? `${protocol}//${hostname}:${port}/api`
|
||||
: `${protocol}//${hostname}/api`;
|
||||
// 현재 웹서버의 도메인/IP를 그대로 사용하되 API 포트(3005)로 직접 연결
|
||||
const baseUrl = `${protocol}//${hostname}:3005/api`;
|
||||
|
||||
console.log('✅ nginx 프록시 사용:', baseUrl);
|
||||
return baseUrl;
|
||||
@@ -27,7 +25,11 @@ function getApiBaseUrl() {
|
||||
return `${protocol}//${hostname}:3005/api`;
|
||||
}
|
||||
|
||||
export const API = getApiBaseUrl();
|
||||
// API 설정
|
||||
const API_URL = getApiBaseUrl();
|
||||
|
||||
export const API = API_URL;
|
||||
export const API_BASE_URL = API_URL;
|
||||
|
||||
export function ensureAuthenticated() {
|
||||
const token = localStorage.getItem('token');
|
||||
|
||||
@@ -22,7 +22,7 @@ document.getElementById('loginForm').addEventListener('submit', async function (
|
||||
// API 헬퍼를 통해 로그인 요청
|
||||
const result = await login(username, password);
|
||||
|
||||
if (result.success && result.token) {
|
||||
if (result.token) {
|
||||
// 인증 정보 저장
|
||||
saveAuthData(result.token, result.user);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user