Compare commits
2 Commits
7e2f9419ab
...
2f56dfb519
| Author | SHA1 | Date | |
|---|---|---|---|
| 2f56dfb519 | |||
| 86c6720f30 |
@@ -22,7 +22,7 @@ jobs:
|
|||||||
rm -rf a301-client
|
rm -rf a301-client
|
||||||
git clone https://tolelom:${{ secrets.GIT_TOKEN }}@git.tolelom.xyz/A301/a301_client.git a301-client
|
git clone https://tolelom:${{ secrets.GIT_TOKEN }}@git.tolelom.xyz/A301/a301_client.git a301-client
|
||||||
cd a301-client
|
cd a301-client
|
||||||
docker build --no-cache -t a301-client:latest .
|
docker build --no-cache --build-arg VITE_API_BASE_URL=${{ secrets.VITE_API_BASE_URL }} -t a301-client:latest .
|
||||||
cd ~/server
|
cd ~/server
|
||||||
docker compose up -d --force-recreate a301-client
|
docker compose up -d --force-recreate a301-client
|
||||||
rm -rf /tmp/a301-client
|
rm -rf /tmp/a301-client
|
||||||
|
|||||||
@@ -4,6 +4,8 @@ WORKDIR /app
|
|||||||
COPY package*.json ./
|
COPY package*.json ./
|
||||||
RUN npm ci --legacy-peer-deps
|
RUN npm ci --legacy-peer-deps
|
||||||
COPY . .
|
COPY . .
|
||||||
|
ARG VITE_API_BASE_URL
|
||||||
|
ENV VITE_API_BASE_URL=$VITE_API_BASE_URL
|
||||||
RUN npm run build
|
RUN npm run build
|
||||||
|
|
||||||
# Stage 2: Serve with Nginx
|
# Stage 2: Serve with Nginx
|
||||||
@@ -11,4 +13,4 @@ FROM nginx:alpine
|
|||||||
COPY --from=builder /app/dist /usr/share/nginx/html
|
COPY --from=builder /app/dist /usr/share/nginx/html
|
||||||
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
||||||
EXPOSE 80
|
EXPOSE 80
|
||||||
CMD ["nginx", "-g", "daemon off;"]
|
CMD ["nginx", "-g", "daemon off;"]
|
||||||
|
|||||||
@@ -1,39 +1,5 @@
|
|||||||
import { apiFetch } from './client';
|
import { apiFetch } from './client';
|
||||||
|
|
||||||
// TODO: 백엔드 연동 시 mock 제거
|
|
||||||
const USE_MOCK = true;
|
|
||||||
|
|
||||||
const MOCK_DATA = [
|
|
||||||
{
|
|
||||||
id: 1,
|
|
||||||
title: '오픈 베타 테스트 안내',
|
|
||||||
content: '2월 28일부터 오픈 베타 테스트가 시작됩니다. 많은 참여 부탁드립니다.',
|
|
||||||
createdAt: '2026-02-24',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 2,
|
|
||||||
title: '클라이언트 v0.2.0 업데이트',
|
|
||||||
content: '멀티플레이어 매칭 시스템이 개선되었습니다. 런처를 통해 업데이트해주세요.',
|
|
||||||
createdAt: '2026-02-20',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 3,
|
|
||||||
title: '서버 점검 안내 (2/18)',
|
|
||||||
content: '2월 18일 02:00 ~ 06:00 서버 점검이 진행됩니다.',
|
|
||||||
createdAt: '2026-02-17',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 4,
|
|
||||||
title: '테스터 모집 공고',
|
|
||||||
content: '신규 테스터를 모집합니다. 관심 있으신 분은 신청해주세요.',
|
|
||||||
createdAt: '2026-02-10',
|
|
||||||
},
|
|
||||||
];
|
|
||||||
|
|
||||||
export async function getAnnouncements() {
|
export async function getAnnouncements() {
|
||||||
if (USE_MOCK) {
|
|
||||||
await new Promise((r) => setTimeout(r, 300));
|
|
||||||
return MOCK_DATA;
|
|
||||||
}
|
|
||||||
return apiFetch('/api/announcements');
|
return apiFetch('/api/announcements');
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,14 +1,6 @@
|
|||||||
import { apiFetch } from './client';
|
import { apiFetch } from './client';
|
||||||
|
|
||||||
// TODO: 백엔드 연동 시 mock 제거
|
|
||||||
const USE_MOCK = true;
|
|
||||||
|
|
||||||
export async function login(username, password) {
|
export async function login(username, password) {
|
||||||
if (USE_MOCK) {
|
|
||||||
await new Promise((r) => setTimeout(r, 500));
|
|
||||||
if (!username || !password) throw new Error('아이디와 비밀번호를 입력해주세요.');
|
|
||||||
return { token: 'mock-jwt-token', username };
|
|
||||||
}
|
|
||||||
return apiFetch('/api/auth/login', {
|
return apiFetch('/api/auth/login', {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
body: JSON.stringify({ username, password }),
|
body: JSON.stringify({ username, password }),
|
||||||
|
|||||||
@@ -1,17 +1,5 @@
|
|||||||
import { apiFetch } from './client';
|
import { apiFetch } from './client';
|
||||||
|
|
||||||
// TODO: 백엔드 연동 시 mock 제거
|
|
||||||
const USE_MOCK = true;
|
|
||||||
|
|
||||||
export async function getDownloadInfo() {
|
export async function getDownloadInfo() {
|
||||||
if (USE_MOCK) {
|
|
||||||
await new Promise((r) => setTimeout(r, 200));
|
|
||||||
return {
|
|
||||||
url: '#',
|
|
||||||
version: 'v0.2.0',
|
|
||||||
fileSize: '1.2 GB',
|
|
||||||
fileName: 'A301_Launcher_Setup.exe',
|
|
||||||
};
|
|
||||||
}
|
|
||||||
return apiFetch('/api/download/info');
|
return apiFetch('/api/download/info');
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ export default function AnnouncementBoard() {
|
|||||||
onClick={() => setExpanded(expanded === item.id ? null : item.id)}
|
onClick={() => setExpanded(expanded === item.id ? null : item.id)}
|
||||||
>
|
>
|
||||||
<span className="announcement-title">{item.title}</span>
|
<span className="announcement-title">{item.title}</span>
|
||||||
<span className="announcement-date">{item.createdAt}</span>
|
<span className="announcement-date">{item.createdAt?.slice(0, 10)}</span>
|
||||||
</button>
|
</button>
|
||||||
{expanded === item.id && (
|
{expanded === item.id && (
|
||||||
<div className="announcement-content">{item.content}</div>
|
<div className="announcement-content">{item.content}</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user